以下是在CentOS上优化Golang编译速度的方法:
-c
-s
-p
-buildcache=true
GOCACHE
go mod vendor
strings.Builder
GOMAXPROCS
gomodproxy
pprof
参考来源: