Go Errors

Enforces Go error handling — errors as values, wrapping with %w, errors.Is and errors.As over type assertions, sentinel and custom error types, and when panic is acceptable. Use when writing, reviewing, or debugging Go error paths, and when the user mentions err != nil, error wrapping, errors.Is, errors.As, sentinel errors, panic, recover, errors.Join, or asks "how should I return this error", "why is errors.Is failing", "should this panic".

CasLubbers a0d9ebd 4.1 KB Updated

File contents

CasLubbers/code-design-skills/tree/main/skills/go-errors commit a0d9ebd344

Frequently asked questions

npx skillmds@latest add caslubbers/go-errors