Template for a typical CLI-tool written on Go.
Work with Makefile
$ make setup $ make help $ make find-todos $ make test lint $ TIMEOUT=5s make test-with-coverageFor 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 mockgenFor 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.19 # or go-1.20, etc. /src# make go-env 2>/dev/null | grep GOVERSION # GOVERSION: 1.19.10 /src# make testDefine a powerful template that quickly creates a new Go CLI-tool. Not only does it provide a starting point for new projects, but it comes equipped with pre-configured ci/cd and inventory.
$ tool do actionAt 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/tool. - 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.
- Nextra.
- Makefiles.
- Taskfiles.
- Go tools: mockgen, golangci-lint, goreleaser, godownloader, goimports, govulncheck.
- CodeQL (code scanning).
- Graphite (git workflow).
- Qodana (code quality).
- SonarCloud (code quality).
- Vanity URL (canonical import path).
- Vercel (docs preview).
$ brew install octolab/tap/toolFor more details please visit the page.
$ curl -fsSL https://install.octolab.org/tool | sh # or $ wget -qO- https://install.octolab.org/tool | shFor more details please visit the page.
# use standard go tools $ go get go.octolab.org/template/tool@latest # or use egg tool $ egg tools add go.octolab.org/template/tool@latestFor more details please visit the page.
$ tool completion > /path/to/completions/... # or $ source <(tool completion)- https://github.com/kamilsk/check
- https://github.com/kamilsk/egg
- https://github.com/kamilsk/forward
- https://github.com/kamilsk/lift
- https://github.com/octomation/go-module
- https://github.com/octomation/maintainer
- https://github.com/octomation/install
- https://github.com/octomation/makefiles
- https://github.com/octomation/taskfiles
- https://github.com/octomation/vanity
🚧 Work in progress.
- https://github.com/kamilsk/go-tools
- https://github.com/kamilsk/godownloader
- https://github.com/kamilsk/golangci-lint
- https://github.com/kamilsk/bridge
- https://github.com/kamilsk/grafaman
- https://github.com/octolab/breakit
- https://github.com/octolab/genome*
- https://github.com/octolab/parallel*
- https://github.com/octolab/testit
- https://github.com/octolab/try*
- https://github.com/octomation/dotapps
- https://github.com/tact-app/airseat
- https://github.com/tact-app/fiddle
- https://github.com/tact-app/loop
- https://github.com/tact-app/secret
made with ❤️ for everyone by OctoLab
