go install github.com/codemodify/gobuild@latest
cd MY-GO-PROJECTgobuild- it understands standard folder layout with
go.modbeing in (https://github.com/golang-standards/project-layout)- the current folder
- the
PKGfolder - the
SRCfolder
- it understands standard folder layout with
cd MY-GO-PROJECTgobuild gen- generates
.gobuild-configfile with platforms to remove / add and other tweaks - generates
.gobuild-versionfile with the version to set (-X main.version=for-ldflags) - generates
.gobuild-binaryfile with the binary file name - these files can be added to the source control for custom builds
- generates
-
this is a tool designed for use in projects that
- don't require custom build setups
- fast prototyping and distribution for different platforms
-
why to look elsewhere
- if you need
docker/buildxfor cross builds in complex scenarios - if you use CGO that will use custom APIs (ex: Xlib for linux, and other things for other OSes)
- custom C/C++ cross-compiler toolchains
- if you need