Template for a typical module written on Go.
Work with Makefile
$ make setup
$ make help
$ make find-todos
$ make test lint
$ TIMEOUT=5s make test-with-coverage
For more details please visit the page.
Work with Taskfile
$ alias run=./Taskfile
$ run refresh
$ run help
$ run docs # === `run docs install -- build -- start`
$ run docs npm ci
$ run docs npm i nextra@latest
$ run tools go generate tools.go
$ run tools golangci-lint --version -- mockgen --version
$ run which goimports golangci-lint govulncheck mockgen
For more details please visit the page.
Work with tools
$ make tools
$ source bin/activate
$ which goimports
$ goimports -local $(go list -m) -w ./...
For more details please visit the page.
Work with Docker
$ make go-1.11 # or go-1.12, etc.
/src# make go-env 2>/dev/null | grep GOVERSION
# GOVERSION: 1.11.13
/src# make test
π§ Work with documentation
Define a powerful template that quickly creates a new Go module. Not only does it provide a starting point for new projects, but it comes equipped with pre-configured ci/cd and inventory.
At OctoLab, we want to start new projects faster using best practices with a predefined structure and focusing on core ideas implementation rather than wasting time on environment configuration and copying boilerplate code.
- Generate a new repository from the template.
- Clone the repository locally.
- Update the desired files as needed, e.g.,
run init my.new/module
. - Write your code and tests.
- π
- Read the contribution guidelines.
- Fork the repository.
- Make your changes.
- Send a pull request.
- π€
Before you start, please make sure your changes are in demand. The best for that is to create a new discussion, or if you find an issue, report it first.
- Bitbucket1.
- Cloudflare Pages2.
- Codecov.
- GitHub Socialify.
- Go Report Card.
- Settings3.
- Shields.io.
- Slack.
- Vanity URL.
- CodeQL (code scanning).
- Graphite (git workflow).
- Qodana (code quality).
- SonarCloud (code quality).
- Vercel (docs preview).
The project uses SemVer for versioning, and it is not BC-safe through major releases. Please use Go Modules to manage its version.
$ go get go.octolab.org@latest
- https://github.com/kamilsk/retry
- https://github.com/kamilsk/semaphore
- https://github.com/kamilsk/tracer
- https://github.com/octolab/breaker
- https://github.com/octomation/go-tool
- https://github.com/octomation/maintainer
- https://github.com/octomation/makefiles
- https://github.com/octomation/taskfiles
- https://github.com/octomation/vanity
- https://github.com/octolab/cli*
- https://github.com/octolab/config
- https://github.com/octolab/pkg*
- https://github.com/octolab/propaganda
- https://github.com/octolab/protocol*
made with β€οΈ for everyone by OctoLab