Cross-Compile

Building Go Applications for Different Operating Systems and Architectures On One Computer. To run a build for a different platform, we simply set the GOOS and GOARCH environment variables (for the operating system and architecture, respectively) and invoke “go build” When you run a command like go build, Go uses the current platform’s GOOS and GOARCH to determine how to build Read more…