Skip to content

Contributing

Build

make build          # build binary to bin/leo
make install        # install to $GOPATH/bin

Test

make test           # go test -race -cover ./...

Run a single test:

go test -race -run TestFunctionName ./internal/config/

Generate a coverage report:

go test -race -coverprofile=coverage.out ./... && go tool cover -html=coverage.out

Lint

make lint           # go vet + staticcheck

Install staticcheck if needed:

go install honnef.co/go/tools/cmd/staticcheck@latest

Release

See the Releasing guide for the full release pipeline. To test a release build locally:

make snapshot       # test a release build locally

Documentation

The documentation site uses MkDocs Material. To preview locally:

pip install mkdocs-material mkdocs-minify-plugin
mkdocs serve

Then open http://localhost:8000.

To build the static site:

mkdocs build --strict

The site deploys automatically to GitHub Pages when changes to docs/ or mkdocs.yml are pushed to main.

Project Structure

See the Architecture page for a detailed breakdown of the package layout and design patterns.