在Ubuntu上优化Golang编译可从以下方面入手:
-c
-s
-p
-p 4
-buildcache true
GOCACHE
go build -modvendor
go mod
gomodproxy
ccache
UPX
参考来源: