go

Solid

This skill should be used when the user works with Go files (.go), asks about "error handling", "interfaces", "goroutines", "channels", "packages", or discusses Go idioms and concurrency. Provides patterns for error handling, interface design, concurrency, and package organization.

Code & Development 17 stars 1 forks Updated yesterday MIT

Install

View on GitHub

Quality Score: 79/100

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

Skill Content

# Go Patterns Reference for Go-specific patterns, idioms, and best practices. Full bibliography: `references/sources.md`. ## Iron Law > **ERRORS ARE VALUES** [5][7] > > Never ignore errors. `if err != nil` is correctness, not boilerplate. Every error > return must be checked, wrapped with context, or explicitly documented as intentionally > ignored with `_ = fn()`. "Errors are values. Values can be programmed." — Rob Pike [5] ## When This Skill Activates Working with Go codebases — error handling, interfaces, goroutines, channels, packages. --- ## Error Handling [5][6] ```go // BAD: return err — caller loses context // GOOD: return fmt.Errorf("reading config %s: %w", path, err) var ErrNotFound = errors.New("not found") func FindUser(id string) (*User, error) { u, err := db.Get(id) if err != nil { return nil, fmt.Errorf("finding user %s: %w", id, err) } if u == nil { return nil, ErrNotFound } return u, nil } // Caller: if errors.Is(err, ErrNotFound) { ... } ``` --- ## Interface Design [7][14] ```go // "The bigger the interface, the weaker the abstraction" — Rob Pike [7] // BAD: func NewService(repo *PostgresRepo) *Service // GOOD: func NewService(repo Repository) *Service — accept interfaces [14] // Small interfaces compose cleanly [1] type Reader interface { Read(p []byte) (n int, err error) } type Writer interface { Write(p []byte) (n int, err error) } type ReadWriter interface { Reader; Writer } ``` --- ## Concurrency [9][10][13]...

Details

Author
dean0x
Repository
dean0x/devflow
Created
10 months ago
Last Updated
yesterday
Language
TypeScript
License
MIT

Integrates with

Bundled in these plugins

Similar Skills

Semantically similar based on skill content — not just same category