21zoo Labs - Assorted Stuff

Golang Cross Compile for Linux Macos and Windows

Posted — Apr 19, 2018

For Linux desktop:

$ GOOS=linux GOARCH=amd64 go build

For MacOS:

$ GOOS=darwin GOARCH=arm64 go build

For old Windows desktop:

$ GOOS=windows GOARCH=386 go build