Go Ecosystem
Installation
SKILL.md
Go Ecosystem
Core Concepts
- Errors are values: Handle explicitly with
if err != nil; use%wto wrap forerrors.Is/errors.As - Interfaces: Accept interfaces, return concrete types; define where used, not implemented; keep small (1-3 methods)
- Concurrency: Goroutines for concurrency, channels for communication,
context.Contextfor cancellation - Zero values: Design types so zero value is useful (
var buf bytes.Bufferready to use)
Naming Conventions
- Packages: lowercase, single-word (no underscores)
- Exported: PascalCase; Unexported: camelCase
- Single-method interfaces: method name + "er" (Reader, Writer, Handler)
- Acronyms uppercase:
HTTPClient,userID - No "Get" prefix for getters:
func (u *User) Name() string