goerr-error-handling
Installation
SKILL.md
Error Handling with goerr
When writing Go error handling code, use the goerr library for enhanced errors with stack traces, contextual values, and structured logging support.
Step 1: Locate goerr documentation
First, find where goerr is installed and read its documentation:
GOERR_DIR=$(go list -m -f '{{.Dir}}' github.com/gaebalai/goerr/v2 2>/dev/null)
If goerr is available, read the relevant documentation from $GOERR_DIR/:
README.md- Full feature overview, code examples, and API referencedocs/migration.md- Migration guide from pkg/errors, standard errors, or goerr v1examples/- Working example programs for each feature