Last active
January 10, 2024 03:07
-
-
Save Xarkam/ec698d6e9dae86db8cd540b57e98e81f to your computer and use it in GitHub Desktop.
Build go from powershell
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#Inspired from https://github.com/golang/go/wiki/WindowsCrossCompiling | |
#Use -ldflags="-s -w" to reduce binary size | |
$env:GOOS="windows";$env:GOARCH="386"; go build -o .\hello.exe .\hello.go |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment