go-idioms

Installation
SKILL.md

Go Idioms

Boring, explicit, race-safe Go. Accept interfaces, return structs.

Error Handling

Always wrap with context at package boundaries:

// Use %w to preserve error chain
return fmt.Errorf("fetching user %s: %w", userID, err)

// Check wrapped errors
if errors.Is(err, sql.ErrNoRows) { ... }

var paymentErr *PaymentError
if errors.As(err, &paymentErr) { ... }

Never: %v (loses type), raw errors from exported functions, generic context.

Related skills
Installs
21
GitHub Stars
10
First Seen
Jan 27, 2026