Golang Error Handling
samber/cc-skills-golangIdiomatic 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.
At a glance
git clone --depth 1 https://github.com/samber/cc-skills-golang
cp -r cc-skills-golang/skills/golang-error-handling ~/.claude/skills/golang-error-handling
Setup, runtime and requirements describe samber/cc-skills-golang, the repo this skill ships in.
Also in samber/cc-skills-golang
View the repoGolang benchmarking, profiling, and performance measurement. Use when writing, running, or comparing Go benchmarks, profiling hot paths with...
Golang CLI application development. Use when building, modifying, or reviewing a Go CLI tool — especially for command structure, flag handli...
Golang code style conventions — line length and breaking, variable declarations, control flow clarity, when comments help vs hurt. Use when...
Golang concurrency patterns. Use when writing or reviewing concurrent Go code involving goroutines, channels, select, locks, sync primitives...
Idiomatic context.Context usage in Golang — propagation through API boundaries, cancellation, timeouts and deadlines, request-scoped values,...
CI/CD pipeline configuration using GitHub Actions for Golang projects — testing, linting, SAST, security scanning, code coverage, Dependabot...
Comprehensive guide for Go database access — parameterized queries, struct scanning, NULLable columns, transactions, isolation levels, SELEC...
Golang data structures — slices (internals, capacity growth, preallocation, slices package), maps (internals, hash buckets, maps package), a...
Comprehensive guide for dependency injection (DI) in Golang. Covers why DI matters (testability, loose coupling, separation of concerns, lif...
Dependency management strategies for Golang projects — go.mod management, installing/upgrading packages, Minimal Version Selection, vulnerab...
Idiomatic Golang design patterns — functional options, constructors, error flow and cascading, resource management and lifecycle, graceful s...
Comprehensive documentation guide for Golang projects, covering godoc comments, README, CONTRIBUTING, CHANGELOG, Go Playground, Example test...