What problem does it solve?
It prevents brittle or noisy Go error handling by ensuring every error is created, wrapped, inspected, and logged in an idiomatic, low-duplication way that preserves debuggability.
Core Features & Use Cases
- Idiomatic error creation and wrapping: enforce lowercase error strings, wrap with fmt.Errorf "{context}: %w", and keep chain integrity for internal layers.
- Correct inspection and combination: use errors.Is for sentinel checks, errors.As for typed chain extraction, and errors.Join to combine independent failures.
- Production-ready logging and boundaries: apply the single handling rule (log OR return), use structured logging with slog, and use samber/oops for production errors with stack traces and context.
- Use Case: while building NetDisk-style services (file uploads, chunking, media processing), apply consistent error patterns so operators can trace failures without duplicate logs or leaking internal details at API boundaries.
Quick Start
Use the skill while implementing a Go function that returns errors (and ensure all errors are checked, wrapped with %w, inspected with errors.Is/errors.As, and ultimately logged only once at the appropriate boundary).