直接打包获得对应平台执行文件即可
go build ./main.go
CGO_ENABLED=0 GOOS=linux GOARCH=amd64 go build -o ./main ./main.go
CGO_ENABLED=0 GOOS=windows GOARCH=amd64 go build -o ./main ./main.go
$ENV:CGO_ENABLED=0
$ENV:GOOS="linux"
$ENV:GOARCH="amd64"
go build -o ./main ./main.go
set CGO_ENABLED=0
set GOOS=linux
set GOARCH=amd64
go build -o ./main ./main.go