Golang Cross Compile for Linux Macos and Windows

Apr, 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