bgo provides a super easy way to build your go apps.
All things you need to do is entering the golang project directory and entering bgo and pressing Enter.
powered by cmdr.
bgo makes your golang building life easier, it's an efficent and extensible build tool.
Run go building with or without a config file .bgo.yml
Scan the directory to grab all main packages and initial .bgo.yml
While
-tags, -ldflags, -asmflags, ...have a try bgo.
v0.3.3 (WIP)
bgo command system now
check-code-qualities alias command added and play gofmt, golint and golint at once.bgo command system with Aliases definitions.bgo init -o bgo.{yml,yaml,json,toml} writes different config file formats with giving suffix.bgo.yml is loaded as an alternative config file now$HOME/.bgo and conf.d subdirectory is primary config files nowv0.3.0
v0.2.17 and older
Download the prebuilt binaries from Release page.
Or Built from source code:
git clone http://github.com/hedzr/bgo.git
cd bgo
go run . -s
go run . -s will run bgo from source code and install itself to ~/go/bin/.
You could run bgo via docker way:
docker pull hedzr/bgo
# or
docker pull ghcr.io/hedzr/bgo:latest
And run it:
docker run -it --rm -v $PWD:/app -v /tmp:/tmp -v /tmp/go-pkg:/go/pkg hedzr/bgo
For macOS/Linux, there is a brew formula:
brew install hedzr/brew/bgo
To work without .bgo.yml, simply go into a folder and run bgo, the cli apps under the folder will be found out and built.
cd my-projects
bgo
Filter the target systems by -for OS/ARCH, -os OS and -arch ARCH:
bgo --for linux/386 -for linux/amd64,darwin/arm64
bgo -os linux -arch 386 -arch amd64 -arch arm64
Both long and short options are available for for, os and arch.
.bgo.yml.bgo.yml at firstcd my-projects
bgo init # create bgo.yml by scanning
mv bgo.yml .bgo.yml # rename it
.bgo.ymlSee sample of .bgo.yml
bgo
bgo will load projects from .bgo.yml and build them
bgo -s: short mode - this will build first project with current GOOS/GOARCH.bgo|bgo -a: auto mode - build projects in .bgo.ymlbgo -f: full mode - build by scanning current directoryRun bgo gen sh --zsh to install auto-completion script to the proper location and enable the feature:
Run bgo gen sh --bash -o=bgo.bash to get bash completions script and put it to the right location. Generally it should be:
bgo generate shell --bash -o=bgo.bash
mv bgo.bash /etc/bash-completion.d/bgo
Nothing needs to do if installed via brew (since v0.3.3+).
Apache 2.0
Content type
Image
Digest
sha256:836373d36…
Size
82.1 MB
Last updated
9 months ago
Requires Docker Desktop 4.37.1 or later.