- Clone repo
- Done! (DepCharge uses Go Modules, and so all dependencies will be installed automatically.)
This command will auto-clean the formatting of project code:
gofmt -s -w *.go
On most days:
go test -cover
go test -coverprofile=c.out
sed -i "s/_$(pwd|sed 's/\//\\\//g')/./g" c.out
go tool cover -html=c.out -o=c.html
The CI pipeline will ensure that at least 80% code coverage exists. The following env will ensure this strict coverage percentage is checked. The go test -cover
command will fail if your coverage is below 80% and this env is set:
export COVER_STRICT=true
Given a version number MAJOR.MINOR.PATCH, increment the:
- MAJOR version when you make incompatible API changes,
- MINOR version when you add functionality in a backwards-compatible manner, and
- PATCH version when you make backwards-compatible bug fixes.
Examples:
- Regular release: v1.0.0
- Pre-release versions: v1.0.0-rc.2
- Build metadata: v1.0.0-rc.1+b78be23