以下是在CentOS上優化Golang編譯速度的方法:
-c
-s
-p
-buildcache=true
GOCACHE
go mod vendor
strings.Builder
GOMAXPROCS
gomodproxy
pprof
參考來源: