Lang: Go
Rules
- Errors: Wrap with
fmt.Errorf("...: %w", err). Never ignore. - Context:
ctx context.ContextMUST be 1st arg. - DB: Use SQLBoiler models/executors. NO GORM/Raw SQL.
- Tests: Table-Driven (
structslice) +testify/require. - Layout: Use
skill nx-monorepoifnx.jsonexists. Otherwise use standardcmd/,internal/,pkg/. - Libs: Log=
log/slog, Conc=errgroup.
Workflow
- Use
skill workflow-envbefore build/run commands. - Build:
go build ./cmd/<app> - Test:
go test -v ./... - Format:
gofmt -w .
Docs: Context7 /golang/go · Fallback: https://go.dev/doc