go语言跨平台生成linux可执行文件

export GO111MODULE=off
export CGO_ENABLED=0
export GOOS=linux
export GOARCH=amd64
go build main.go
原文地址:https://www.cnblogs.com/huim/p/14920189.html