golang-master

Featured

Write or review production Go: errors, concurrency, context, types, generics, safety, tests, benchmarks, profiling, modernization, and module structure. Project/framework conventions and third-party API lookup have separate owners.

AI & Automation 2,894 stars 189 forks Updated today MIT

Install

View on GitHub

Quality Score: 96/100

Stars 20%
100
Recency 20%
100
Frontmatter 20%
70
Documentation 15%
100
Issue Health 10%
50
License 10%
100
Description 5%
100

Skill Content

# Golang Master Language-level doctrine for **Go 1.21+** (1.22–1.26 features flagged inline) in any Go codebase. This skill is the generic floor; a project's own guidelines skill overrides it wherever the two conflict, and this skill owns everything the project leaves unsaid. Use the matching reference sections for a concrete Go concern. Reuse current context; do not load every reference merely because Go appears in the task. Project conventions and supported Go versions govern applicability. ## The floor Non-negotiables for every line of Go, regardless of branch: 1. Every error is handled or carries a written justification at the discard site — never a bare `_`. 2. Errors wrap with `fmt.Errorf("context: %w", err)` and are matched with `errors.Is`/`errors.As` — never by string comparison. 3. `ctx context.Context` is the first parameter of any function that does I/O, blocks, or crosses an API boundary, and the caller's ctx is propagated — never a fresh `context.Background()` mid-path. 4. Every goroutine has an owner, an exit path, and a way to be waited on. 5. `panic` is reserved for impossible states; expected failures return errors. 6. Check uncertain type assertions. Initialize maps before writes; use nil/zero-value slices when their semantics fit the contract. 7. Use compile-time interface assertions for an intentional implementation contract; do not invent interfaces just to add an assertion. 8. Tests prove the owning invariant. Use tables for multiple cases and race...

Details

Author
compozy
Repository
compozy/compozy
Created
7 months ago
Last Updated
today
Language
Go
License
MIT

Similar Skills

Semantically similar based on skill content — not just same category