go test ./...
go test -race ./... # linux/amd64
go vet ./...
Keep gofmt non-negotiable:
gofmt -w .
In CI, prefer a check-only step (fail if diff).
golangci-lint is the common aggregator:
golangci-lint run ./...
go mod tidy
git diff --exit-code go.mod go.sum
Build at least:
linux/amd64 (often includes -race tests)linux/arm64darwin/arm64windows/amd64Cache:
This speeds up CI dramatically in mono-repos.