gox
Go cross-compilation tool
TLDR
Build for all platforms
$ gox
Build for specific platforms$ gox -osarch="linux/amd64 darwin/amd64"
Build specific package$ gox [./cmd/app]
Set output path$ gox -output="dist/{{.Dir}}_{{.OS}}_{{.Arch}}"
Parallel builds$ gox -parallel=[4]
SYNOPSIS
gox [options] [packages]
DESCRIPTION
gox is a simple Go cross-compilation tool that builds Go binaries for multiple platforms in parallel. It wraps `go build` with convenient cross-compilation options and templated output paths using OS and architecture variables.
The tool simplifies creating release builds for multiple target platforms from a single command.
PARAMETERS
PACKAGES
Packages to build.-osarch TARGETS
OS/arch combinations.-os OS
Target operating systems.-arch ARCH
Target architectures.-output PATTERN
Output path pattern.-parallel N
Parallel builds.--help
Display help information.
CAVEATS
CGO may complicate cross-compile. Large number of targets is slow. Consider goreleaser for releases.
HISTORY
gox was created by Mitchell Hashimoto (HashiCorp) to simplify building Go binaries for multiple platforms.
SEE ALSO
go-build(1), goreleaser(1)
