This repo generally follows the Uber Go Style Guide.
Exported Go identifiers should have GoDoc comments, and each comment should start with the identifier name or Deprecated:.
Common repository targets expect these tools on PATH:
makegotestsum for make specsfieldalignment for make lintgolangci-lint for full make lint coverage (the wrapper no-ops when it is missing)govulncheck and trivy for make secmkcert for local TLS fixtures and make create-certsbuf for make generategoda and Graphviz dot for make diagramsThis repo uses a bin/ git submodule for make targets.
git submodule sync
git submodule update --init
mkcert -install
make create-certs
make dep
If submodule fetch fails, ensure GitHub SSH access is configured (.gitmodules uses git@github.com:... URLs).
make help
vendor/ workflow)make dep
make dep runs:
go mod downloadgo mod tidygo mod vendorTests are run with -mod vendor, so after dependency changes run make dep before make specs.
make start uses the shared Docker-based environment from the sibling
../docker repo. It requires Docker and may require GitHub SSH access if that
sibling repo must be fetched.
Start required services:
make start
Stop them:
make stop
Run unit tests with race + coverage:
make specs
Artifacts:
test/reports/specs.xmltest/reports/profile.covmake lint
make fix-lint
make format
make sec
make benchmarks
make http-benchmarks
make grpc-benchmarks
make limiter-benchmarks
make sql-benchmarks
make cache-benchmarks
make bytes-benchmarks
make strings-benchmarks
make id-benchmarks
make net-http-benchmarks
make http-content-benchmarks
make fuzzes
make bytes-fuzz
make time-fuzz
make encoding-fuzz
make compress-fuzz
make net-fuzz
make package=encoding/json name=FuzzUnmarshal fuzztime=10s fuzz
make coverage
make html-coverage
make func-coverage
Root generation targets are for the internal/test protobuf fixtures. After
changing those fixtures, regenerate them. To match the CI stale-output check,
run make generate-stale from a clean worktree, or after staging the intended
fixture and generated-file changes:
make generate
make generate-stale
make diagrams
make crypto-diagram
make database-diagram
make telemetry-diagram
make transport-diagram