编译优化

go build -ldflags="-s -w" -o xxx main.go


upx 优化

下载upx 


https://github.com/upx/upx/releases/


开始压缩程序

upx -9 xxx


注意这里的9 是指的压缩等级,等级越大压缩越慢