Open geektutu opened 3 years ago
学到了很多细节,感谢!
@xiezhenyu19970913 笔芯~ 😊
好文
讲得很好,博主很厉害,跟着你学习
学到了,写的很棒
期待更新。
👍🏻棒棒哒~💯
感谢,写的非常好👍
@lanjianvae 期待更新。
大佬,请问你github里关于go面试的资料可以分享一下吗
2.3没看懂有什么意义呢,或者说存在哪些应用场景呢
2.3没看懂有什么意义呢,或者说存在哪些应用场景呢
我的理解是用来给一系列方法分组的
@EndlessCheng
2.3没看懂有什么意义呢,或者说存在哪些应用场景呢
我的理解是用来给一系列方法分组的
啊,十分感谢
精妙啊
讲得很详细,学到了
这里在worker函数首行执行<-ch,会不会导致<-ch后面的代码还未执行main函数就已经退出的情况。
2.3 仅包含方法的结构体 func worker(ch chan struct{}) { <-ch fmt.Println("do something") close(ch) }
func main() { ch := make(chan struct{}) go worker(ch) ch <- struct{}{} }
https://geektutu.com/post/hpg-empty-struct.html
Go 语言/golang 高性能编程,Go 语言进阶教程,Go 语言高性能编程(high performance go)。本文介绍了使用空 struct{}/空结构体的优点:不占用内存,且具有良好的语义。