macOS Golang 1.5+ 跨平台编译

Go (Golang) GOOS and GOARCH 列表

跨平台编译时命令示例

env GOOS=windows GOARCH=386 go build -v github.com/path/to/your/app
env GOOS=windows GOARCH=amd64 go build -v github.com/path/to/your/app
env GOOS=linux GOARCH=386 go build -v github.com/path/to/your/app
env GOOS=linux GOARCH=amd64 go build -v github.com/path/to/your/app

你可能感兴趣的:(macOS Golang 1.5+ 跨平台编译)