golang创建静态链接的可执行文件 2017-06-17 本文已影响0人 星之所在_985c 1.export CGO_ENABLED=0 2.go get -a -ldflags '-s' 加-ldflags '-s'省略了50%的调试信息 缩减文件大小 3.go build