[Go] Golang Context 2020-08-08 golang 2371 words 5 mins read Golang Context Context 接口 1 2 3 4 5 6 7 8 9 type Context interface { Deadline() (deadline time.Time, ok bool) Done() <-chan struct{} Err() error Value(key interface{}) interface{} } context包提供暴露Context接口可以在多个Goroutine共享数 Read more...
[Go] Golang Channel 2020-08-08 golang 1897 words 4 mins read Don’t communicate by sharing memory, share memory by communicating. 介绍 channel是GO语言级别提供的goroutine间的通信方式,channel是类型相关的,需要在声明channel Read more...
[VIM] Vim实用小技巧 2020-08-07 vim 1112 words 3 mins read Vim实用小技巧 插入递增数字 let i=0 | g/toPlaced/s//\=i/ |let i=i+1 这条命令由三部分组成: let i=1 和 let i=i+1 构成了一个变量递增的循环。 g命令用于全局查找一个字符串,并对此字符串 Read more...
[VIM] vim十六进制格式查看 2020-08-07 vim 359 words 1 min read vim十六进制格式查看 xxd xxd是linux下一个显示、编辑、转换二进制命令 man xxd 查看帮助 DESCRIPTION xxd creates a hex dump of a given file or standard input. It can also convert a hex dump back to its original binary form. Like Read more...