All code in this repo is written in golang. The golang package is required to build and run the tools.
The build system uses mage, which can be installed with go install github.com/magefile/mage@latest. Alternatively, a zero-install approach is available through go run magefile.go or ./magefile.go, which automatically downloads the required dependencies without manual installation. All additional build tools are managed automatically by go, and no manual tool installation is required.
All other tooling dependencies are handled by go tool, which will automatically get the required tools when using mage. See the tools section for more information.
This repo contains configs for the golangci-lint linter. It is installed as part of the VSCode go extension. It's also optionally available as a binary release.
| Command | Description | When to Use |
|---|---|---|
mage -l |
List all available targets | To see all options |
mage all |
Full build, test, and check pipeline | Before submitting PR |
mage build |
Build Go binaries | After code changes |
mage install |
Build Go binaries and install | Outer-loop testing |
mage unit |
Run unit tests | After writing tests |
mage scenario |
Run scenario tests (SLOW) | For major changes |
mage scenarioUpdate |
Update test snapshots | When test expectations change |
mage check all |
Run all quality checks | Before committing |
mage fix all |
Auto-fix code issues | When linting fails |
mage generate |
Run code generation | Automatic with build/test |
Note: Dependencies run automatically in correct order
(i.e. mage build and mage unit automatically run code generation as needed).
The project uses automatic code generation including:
go:generatedirectives- Stringer for enums
- Schema generation
- Mocks generated by
mockgen
You typically don't need to run mage generate manually as it's included in build dependencies.
See tools documentation for more details on how to use tools with go tool in go:generate directives.