上一页 1 ··· 127 128 129 130 131 132 133 134 135 ··· 236 下一页
摘要: 一、指令格式化 LABEL LABEL vendor=ACME\ Incorporated \ com.example.is-beta= \ com.example.is-production="" \ com.example.version="0.0.1-beta" \ com.example.r 阅读全文
posted @ 2021-11-20 10:52 技术颜良 阅读(96) 评论(0) 推荐(0) 编辑
摘要: github.com/spf13/cast 阅读全文
posted @ 2021-11-19 08:42 技术颜良 阅读(16) 评论(0) 推荐(0) 编辑
摘要: func ModenT() (config *ssh.ClientConfig,err error) { config = &ssh.ClientConfig{ User: "cheyunhua", } config.Auth=[]ssh.AuthMethod{ssh.Password("12333 阅读全文
posted @ 2021-11-18 15:05 技术颜良 阅读(66) 评论(0) 推荐(0) 编辑
摘要: 光看标题,大家可能不太理解我说的是啥。 我们平时创建一个协程,跑一段逻辑,代码大概长这样。 package mainimport ( "fmt" "time")func Foo() { fmt.Println("打印1") defer fmt.Println("打印2") fmt.Println(" 阅读全文
posted @ 2021-11-18 12:24 技术颜良 阅读(120) 评论(0) 推荐(0) 编辑
摘要: 当你使用要对一个变量从一个类型强制转换成另一个类型,其实都会发生内存的拷贝,而这种拷贝会对性能有所影响的,因此如果可以在转换的时候避免内存的拷贝就好了。 庆幸的是,在一些特定的类型下,这种想法确实是可以实现的。 比如将字符串转成 []byte 类型。 正常的转换方法是 // string to [] 阅读全文
posted @ 2021-11-18 10:11 技术颜良 阅读(292) 评论(0) 推荐(1) 编辑
摘要: https://mojotv.cn/go/create-your-own-ssh-server 1. 🎼 解决了什么 我有很多行日志数据单行的格式是这样的 HOST;000012000629948340196501;ipv4;3; ips: user_id=2;user_name=172.21.1 阅读全文
posted @ 2021-11-17 14:34 技术颜良 阅读(49) 评论(0) 推荐(0) 编辑
摘要: Linux就该这么学 iptables的结构: iptables由上而下,由Tables,Chains,Rules组成。 一、iptables的表tables与链chains iptables有Filter, NAT, Mangle, Raw四种内建表: 1. Filter表 Filter是ipta 阅读全文
posted @ 2021-11-17 09:29 技术颜良 阅读(735) 评论(0) 推荐(0) 编辑
摘要: type User struct { Name string `asong:"Username"` Age uint16 `asong:"age"` Password string `asong:"min=6,max=10"`}func getTag(u User) { t := reflect.T 阅读全文
posted @ 2021-11-17 09:23 技术颜良 阅读(380) 评论(0) 推荐(0) 编辑
摘要: 本文只介绍template的语法和用法,关于template包的函数、方法、template的结构和原理,见:深入剖析Go template。 入门示例 以下为test.html文件的内容,里面使用了一个template语法{{.}}。 <!DOCTYPE html> <html> <head> < 阅读全文
posted @ 2021-11-16 12:23 技术颜良 阅读(867) 评论(0) 推荐(0) 编辑
摘要: 来源 | switowski.com/blog/favorite-cli-tools 程序员在搞开发时,终端CLI工具的使用必不可少,往往都是生产力工具,所以今天在此给大家推荐一下比较好用的终端工具。先给大家列个推荐清单,如下图。 高频 CLI 工具推荐 1、fish shell 毋庸置疑,在终端工 阅读全文
posted @ 2021-11-16 10:12 技术颜良 阅读(129) 评论(0) 推荐(0) 编辑
上一页 1 ··· 127 128 129 130 131 132 133 134 135 ··· 236 下一页