go生成linux可运行文件

安装好golang,且已经配置好了GOROOT,GOPATH

set GOARCH=amd64
set GOOS=linux

go build xxx.go

赋予权限
chmod 777 xxx

执行
./xxx

Logo

更多推荐