language-go

Installation
SKILL.md

Go

Errors are values

  • Return error; do not panic across package boundaries.
  • Wrap with fmt.Errorf("doing X: %w", err) to preserve the chain.
  • Inspect with errors.Is and errors.As. Never string-match messages.
  • Sentinel errors (var ErrNotFound = errors.New(...)) for expected cases; typed errors when callers need structured data.
if err != nil {
    return fmt.Errorf("load user %s: %w", id, err)
}

Interfaces — small, defined by the consumer

  • Define interfaces in the package that uses them, not where concrete types live.
  • Single-method interfaces are normal (io.Reader, io.Closer).
  • Accept interfaces, return concrete types.
Installs
2
GitHub Stars
2
First Seen
Jun 10, 2026
language-go — lugassawan/swe-workbench