Directories ¶
Path | Synopsis |
---|---|
生成汇编文件
|
生成汇编文件 |
bench
|
|
大文件内容排序
|
大文件内容排序 |
位运算
|
位运算 |
reader.ReadLine 会使用 bufio.Reader.buf 字段,因此在调用多一次 ReadLine 后,前面的 a 变量会被后面的 b 变量覆盖
|
reader.ReadLine 会使用 bufio.Reader.buf 字段,因此在调用多一次 ReadLine 后,前面的 a 变量会被后面的 b 变量覆盖 |
channel
|
|
one_wite_two_read
一个管道写,两个管道读,谁先读到呢 看标准库 database/sql sql.go
|
一个管道写,两个管道读,谁先读到呢 看标准库 database/sql sql.go |
why_zero_value_is_nil
为什么 chan 的零值是 nil ? https://medium.com/justforfunc/why-are-there-nil-channels-in-go-9877cc0b2308 结合 空对象模式 理解,让零值也有意义 源码:https://github.com/campoy/justforfunc/blob/master/26-nil-chans/main.go
|
为什么 chan 的零值是 nil ? https://medium.com/justforfunc/why-are-there-nil-channels-in-go-9877cc0b2308 结合 空对象模式 理解,让零值也有意义 源码:https://github.com/campoy/justforfunc/blob/master/26-nil-chans/main.go |
closure
|
|
variable
哪些类型的变量值会随时间改变呢
|
哪些类型的变量值会随时间改变呢 |
修饰器
|
修饰器 |
this is doc.go
|
this is doc.go |
枚举,一组预定义好的值 需要遍历,获取和校验,容易扩展 一般用于特定范围的变量
|
枚举,一组预定义好的值 需要遍历,获取和校验,容易扩展 一般用于特定范围的变量 |
func
|
|
pass_value
Go 里面的函数传参都是值
|
Go 里面的函数传参都是值 |
For gc test
|
For gc test |
go-vendor-find-defined
|
|
go1.10的变动
|
go1.10的变动 |
使用panic和recover编写一个不包含return语句但能返回一个非零值的函数
|
使用panic和recover编写一个不包含return语句但能返回一个非零值的函数 |
wsl 无法使用 grmon 监控,必须使用 ubuntu 虚拟机
|
wsl 无法使用 grmon 监控,必须使用 ubuntu 虚拟机 |
handler
|
|
This example demonstrates an integer heap built using the heap interface.
|
This example demonstrates an integer heap built using the heap interface. |
int 和 uint 的长度,4字节,还是8字节呢?
|
int 和 uint 的长度,4字节,还是8字节呢? |
接口的私有方法是否需要继承
|
接口的私有方法是否需要继承 |
From https://lingchao.xin/post/memory-leaking.html
|
From https://lingchao.xin/post/memory-leaking.html |
多维切片
|
多维切片 |
Click to show internal directories.
Click to hide internal directories.