随笔分类 - golang
摘要:小结: 【CPU热点】go tool pprof -seconds 30 https://<测试域名>/debug/pprof/profile【内存分配】go tool pprof -seconds 30 https://<测试域名>/debug/pprof/allocs 采样依据sample_in
阅读全文
摘要:golang:快来抓住让我内存泄漏的“真凶”! https://mp.weixin.qq.com/s/FyHEiaa-UfyLStMKl2VFGA 原创 李卓奕 云加社区 2021-08-30 导语 | 有句话说得好:“golang10次内存泄漏,8次goroutine泄漏,1次真正内存泄漏”,那还
阅读全文
摘要:短视频go研发框架实践 原创 ma78794656 百度Geek说 2021-08-18 18:09 短视频go研发框架实践 https://mp.weixin.qq.com/s/JdBjyb95U_oijYoszJubEw 导读:hulk是短视频研发部研发的基于GDP2(Go Develop Pl
阅读全文
摘要:func increaseA() int { var i int defer func() { i += 256 }() return i } func increaseB() (r int) { defer func() { r += 256 }() return r } func increas
阅读全文
摘要:Go 为什么这么“快”? https://mp.weixin.qq.com/s/CCU5b-9RFwsjdZQ4hugIgA https://mp.weixin.qq.com/s/CCU5b-9RFwsjdZQ4hugIgA https://mp.weixin.qq.com/s/CCU5b-9RFw
阅读全文
摘要:收发普通消息 - 消息队列RocketMQ版 - 阿里云 https://help.aliyun.com/document_detail/255809.html package main import ( "fmt" "github.com/gogap/errors" "strings" "time
阅读全文
摘要:There is no pass-by-reference in Go – The acme of foolishness https://dave.cheney.net/2017/04/29/there-is-no-pass-by-reference-in-go If a map isn’t a
阅读全文
摘要:panic: runtime error: invalid memory address or nil pointer dereference11:04:55 BizDomain | [signal SIGSEGV: segmentation violation code=0x1 addr=0x28
阅读全文
摘要:6.11 计时器 | Go 语言原本 https://golang.design/under-the-hood/zh-cn/part2runtime/ch06sched/timer/ https://mp.weixin.qq.com/s/tkm9nYcyUxE2vUbplSO-pA Go-Zero如
阅读全文
摘要:ctx = context.WithValue(ctx, "2", "two") fmt.Println(ctx.Value("1")) fmt.Println(ctx.Value("2"))
阅读全文
摘要:type reverse struct { // This embedded Interface permits Reverse to use the methods of // another Interface implementation. Interface} // Package sort
阅读全文
摘要:C:/Go/pkg/mod/google.golang.org/grpc@v1.29.1/metadata/metadata.go:180 // FromOutgoingContextRaw returns the un-merged, intermediary contents// of rawM
阅读全文
摘要:https://mp.weixin.qq.com/s/_SYT7zWqvFnfH02cHFOgow
阅读全文
摘要:https://mp.weixin.qq.com/s/zcqzarXMJrDUY5DLXZXY1Q 【Golang】图解函数调用栈 原创 封幼麟 幼麟实验室 2020-07-20
阅读全文
摘要:https://mp.weixin.qq.com/s/HGfRRO1Acz-sVe_vLau2FA 初学Go语言时常见的小坑:goroutine、panic和recover 原创 博文视点 博文视点Broadview 2020-07-23
阅读全文
摘要:Introduction to Go Modules – Roberto Selbach https://roberto.selbach.dev/intro-to-go-modules/ go mod使用 - 简书 https://www.jianshu.com/p/760c97ff644c 一个包
阅读全文
摘要:Linters | golangci-lint https://golangci-lint.run/usage/linters/
阅读全文
摘要:https://github.com/golang/go/wiki/CodeReviewComments#interfaces
阅读全文
摘要:https://mp.weixin.qq.com/s/NIYxzycAqHzeVSgU7ixhNg 代码会死循环吗?Go 异步抢占 GCTT:lxbwolf Go语言中文网 2021-04-21 Go: Goroutine and Preemption. ℹ️ This article is bas
阅读全文
摘要:实践: 1、 type T struct { A string B []string C bool D map[string]string E map[string][]string } t1 := T{"a1", []string{"s1"}, true, map[string]string{"m
阅读全文

浙公网安备 33010602011771号