Skip to content

Instantly share code, notes, and snippets.

@byronmansfield
Created February 20, 2018 16:20
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save byronmansfield/3a24a5dd3e6ef36bc6e625fcd58c2e7e to your computer and use it in GitHub Desktop.
Save byronmansfield/3a24a5dd3e6ef36bc6e625fcd58c2e7e to your computer and use it in GitHub Desktop.
Cross Compile Golang Projects
for GOOS in darwin linux windows; do
for GOARCH in 386 amd64; do
GOOS=$GOOS GOARCH=$GOARCH go build -v -o my-app-$GOOS-$GOARCH
done
done
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment