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