Skip to content

Instantly share code, notes, and snippets.

@wizardishungry
Created March 6, 2022 02:23
Show Gist options
  • Save wizardishungry/ca05e8e113c5554204047c83601923b5 to your computer and use it in GitHub Desktop.
Save wizardishungry/ca05e8e113c5554204047c83601923b5 to your computer and use it in GitHub Desktop.
oneliner to build a go package for every platform
go tool dist list |xargs -n 1 |sed -e 's#^\(.*\)/\(.*\)#GOOS=\1 GOARCH=\2 go build -o \1_\2 .#' |xargs -P 0 -n 1 -d \\n sh -c
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment