go-error-handling
Installation
SKILL.md
Go Error Handling
Compatibility:
errors.Is,errors.As, and%wwrapping require Go 1.13+; structured logging examples may uselog/slogfrom Go 1.21+.
Resource Routing
scripts/check-errors.sh- Run when checking string-based error matching, bare error propagation, and log-and-return patterns.scripts/check-errors-ast.go- Implementation helper invoked bycheck-errors.sh; patch this when changing error-flow analysis behavior.references/ERROR-FLOW.md- Read when deciding where to handle, wrap, log, or return errors.references/ERROR-TYPES.md- Read when choosing sentinel errors, typed errors, or opaque errors.references/WRAPPING.md- Read when choosing%wversus%vor crossing package boundaries.
In Go, errors are values — they are created by code and consumed by code.