# Go error handling

> Idiomatic Golang error handling, creation, wrapping with %w, errors.Is/As, errors.Join, custom error types, sentinel errors, panic/recover.

- Page: https://youraiskill.com/skill/samber-golang-error-handling
- What it does: Idiomatic Golang error handling — creation, wrapping with %w, errors.Is/As, errors.Join, custom error types, sentinel errors, panic/recover, the single handling rule, structured logging with slog, HTTP request logging middleware, and samber/oops for production errors. Built to make logs usable at scale with log aggregation 3rd-party tools. Apply when creating, wrapping, inspecting, or logging errors in Go code. For samber/oops specifics → See `samber/cc-skills-golang@golang-samber-oops` skill; for slog handler ecosystem → See `samber/cc-skills-golang@golang-samber-slog` skill.
- Niches: coding
- Licence: MIT
- Status: Free on GitHub: not rated 7 or higher by Claude yet, or it does something a person should look at first (for example runs programs or calls the internet), or its licence or authorship needs a look. Never sold.
- Contents: instructions and reference files only (5 files)

To add it, see https://youraiskill.com/guides/how-to-add-a-skill-to-claude
