Go Error Handling

Use when writing, wrapping, inspecting, or logging Go errors. Covers strategy choice (sentinel vs typed vs opaque), wrapping with %w/%v, errors.Is/As/Join, the log-or-return rule, error strings, and panic/recover boundaries. Apply proactively whenever a function returns or accepts an error, even if the user has not asked about error handling.

muratmirgun Updated

File contents

muratmirgun/gophers/tree/main/skills/go-error-handling commit 5eb4503f5f

Frequently asked questions

npx skillmds@latest add muratmirgun/go-error-handling