go-errors

Installation
SKILL.md

Go Errors

Errors are values. Treat them with the same care as any other return.

For the comprehensive reference, see references/error-handling.md.

The four rules

  1. Check every returned error. No exceptions for "this can't fail."
  2. Handle each error exactly once. Either log it OR return it; never both. Log-and-return causes duplicate log lines further up the stack.
  3. Wrap with context as the error travels up.
  4. Never panic in library code. Return an error and let the caller decide.

Decision tree

Installs
4
Repository
marsolab/skills
First Seen
May 11, 2026
go-errors — marsolab/skills