# README
GO CLI
Template for building command-line interfaces in golang.
Template Use
This repo is intended to be used as a template for building go-based command-line interfaces.
See the github docs For more info.
After creating a new project from this template, some customization will be required.
To aid in identifying and locating these items, comments including the words TEMPLATE_TODO
have been added to the codebase. Using your editor of choice, search/grep for this tag
and make adjustments as indicated by comments at those locations. These comments can
then be deleted if desired.
Releasing
This project follows semantic versioning.
When it's time to create a new release version:
-
make git/changes
to review changes since the last release. Based on the changes, decide what kind of release is required (bugfix, feature or breaking). -
BUMP=(major|minor|patch|bugfix|feature|breaking) make git/tag
to create a new git tag. (bugfix, feature and breaking are aliases for semver's patch, minor and major). BUMP defaults to patch. The command assumes you have a remote repository namedorigin
pointing to this repository. If you'd prefer to specify a different remote repository, you can do so by settingORIGIN=(preferred remote name)
. -
make github/release
to create a new release based on the most recent git tag. This step will build application binaries for each os and architecture, docker images based on the binary, upload the images to a docker registry and the binaries to the github release.
Prerequisites
- goreleaser
- docker
GITHUB_TOKEN
defined in.env.goreleaser
withrepo
access.