cali-coding-go-standards
Go Backend Development Guidelines
When to Use This Skill
Activate when the user works with Go backend code — writing services, APIs, CLI tools, concurrent code, or reviewing/refactoring existing Go. Also triggers on linting, testing, dependency management, or local dev tooling (Air).
Examples
Example 1: Review Go code for idiomatic correctness — check error handling, context propagation, interface design, naming, and avoid any in business logic.
Example 2: Set up a new Go project — configure Air for live reload, add golangci-lint with recommended rules, install pre-commit hooks, set up CI check workflow, and enforce file/function size limits with automated enforcement.
Example 3: Debug concurrent code — identify the correct concurrency primitive (channel, mutex, atomic, errgroup) based on the data flow pattern, and verify no race conditions.
Example 4: Refactor oversized code — a file at 480 lines needs splitting before new logic; a god function at 120 lines needs extraction into focused helpers. Propose the split structure explicitly.