随笔分类 - golang
摘要:入 Go 必读:大型Go工程的项目结构及实战思考 原创 毛剑 QCon 今天
阅读全文
摘要:CommonMistakes https://golang.org/doc/faq#closures_and_goroutines Why is there no goroutine ID? ¶ Goroutines do not have names; they are just anonymou
阅读全文
摘要:goroutines inside of goroutines
阅读全文
摘要:https://talks.golang.org/2013/advconc.slide#5 It's easy to go, but how to stop? Long-lived programs need to clean up. Let's look at how to write progr
阅读全文
摘要:https://go.dev/blog/pipelines Go Concurrency Patterns: Pipelines and cancellation Sameer Ajmani13 March 2014 Introduction Go's concurrency primitives
阅读全文
摘要:小结: 1、 Background is the root of any Context tree; it is never canceled: 2、 https://blog.golang.org/context Sameer Ajmani29 July 2014 Introduction In
阅读全文
摘要:tick := time.NewTicker(4000 * time.Millisecond) select { case i := <-data2send: log.Println(i) s := convertMsg(i) producer.Produce(&kafka.Message{ Top
阅读全文
摘要:Go1.13 标准库的 http 包爆出重大 bug,你的项目中招了吗? 原创: 王亚楼 Go语言中文网 今天
阅读全文
摘要:【Go】高效截取字符串的一些思考 | thinkeridea博客 https://blog.thinkeridea.com/201910/go/efficient_string_truncation.html 【Go】高效截取字符串的一些思考 2019-10-31 最近我在 Go Forum 中发现
阅读全文
摘要:实践: 1、 package main func main() { var a string = func() string { return "a" }() var b string = "b" f := func() string { return "c" } f1 := func() stri
阅读全文
摘要:小结: 1、 conflicting access 2、性能危害 优化 The cost of race detection varies by program, but for a typical program, memory usage may increase by 5-10x and ex
阅读全文
摘要:实践: 1、 var f1 func(map[int]int) = func(m map[int]int) { m[1] = 123 for i := 3; i < 1025; i++ { break m[i] = i + 10000 } m[2] = 2 } m := map[int]int{1:
阅读全文
摘要:小结: 1、 三色标记的一个明显好处是能够让用户程序和 mark 并发的进行 Go GC 卡顿由秒级降到毫秒级以下:到底做了哪些优化? https://mp.weixin.qq.com/s/2BMGGt31pvnPM363GZw6aA 原创 guyan0319 Go语言中文网 2019-10-12
阅读全文
摘要:性能数据 · Excelize 中文文档https://xuri.me/excelize/zh-hans/performance.html Golang library for reading and writing Microsoft Excel™ (XLSX) files. https://gi
阅读全文
摘要:? 这是个很好的问题。Go 当前的 GC 显然做了一些额外的工作,但它也跟其他的工作并行执行,所以在具有备用 CPU 的系统上,Go 正在作出合理的选择。请看 https://golang.org/issue/17969 结束语(Closing notes) 通过研究 Go 垃圾收集器,我能够理解
阅读全文
摘要:https://github.com/golang/go/wiki/CodeReviewComments https://studygolang.com/articles/6054
阅读全文
摘要:小结: 1、 微服务中某个服务出现随机延迟、某个服务不可用。 存储系统磁盘 IO 延迟增加、IO 吞吐量过低、落盘时间长。 调度系统中出现热点,某个调度指令失败。 充值系统中模拟第三方重复请求充值成功回调接口。 游戏开发中模拟玩家网络不稳定、掉帧、延迟过大等,以及各种异常输入(外挂请求)情况下系统是
阅读全文
摘要:https://mp.weixin.qq.com/s/JcED2qgJEj8LaBckVZBhDA https://github.com/golang/go/wiki/MutexOrChannel MutexOrChannel EditNew Page MutexOrChannel EditNew
阅读全文
摘要:https://mp.weixin.qq.com/s/MBY6l5VxrFPJ4AA8nGeQUQ 《Go语言实战》笔记(十六) | Go并发示例-Pool 飞雪无情 异步图书 2017-06-27
阅读全文
摘要:引用 从数据结构 资源消耗角度考虑
阅读全文