This file provides guidance to Claude Code (claude.ai/code) when working with code in this repository.
github.com/foomo/gateway is a Go library (no binaries) for creating application gateways. Go 1.25, module-only. Uses github.com/stretchr/testify for testing.
make test # Run tests (uses -tags=safe, outputs coverage.out)
make test.race # Run tests with race detector
make test.update # Run tests with -update flag (golden/snapshot updates)
make lint # Run golangci-lint
make lint.fix # Run golangci-lint with --fix
make fmt # Format code (golangci-lint fmt)
make tidy # go mod tidy
make generate # go generate ./...Run a single test: go test -tags=safe -run TestName ./path/to/package
Prerequisites: mise (tool manager) and lefthook (git hooks) must be installed. Run mise install to set up tool versions.
- golangci-lint v2 config with
default: all(all linters enabled, specific ones disabled) - Build tag
safeis required for both linting and testing - Formatters:
gofmtandgoimports - Pre-commit hook auto-formats staged
.gofiles viagolangci-lint fmt
CI runs on push to main and PRs:
make tidy+make generate+make fmt— must produce no diffsmake lintmake test
- Commit messages follow Conventional Commits (
feat:,fix:,docs:,refactor:, etc.) - Releases triggered by
v*.*.*tags via goreleaser (library-only, no binaries) - Documentation site uses VitePress + Bun (
make docsto serve locally)