go-error
CommunityMaster Go error handling patterns
Authorvictorzhuk
Version1.0.0
Installs0
System Documentation
What problem does it solve?
This Skill helps developers implement robust and idiomatic Go error handling, ensuring clear context, proper error chaining, and effective error management in production applications.
Core Features & Use Cases
- Error Wrapping: Learn to use
fmt.Errorfwith%wto add context while preserving the original error. - Custom Error Types: Define custom error types with
Error()methods and optionalIs()/Unwrap()for specific error conditions. - Sentinel Errors: Understand how to use
errors.New()for comparable error values and check them witherrors.Is(). - Error Chains: Inspect complex error chains using
errors.Is()anderrors.As()to handle specific error types or values. - Use Case: Debugging a complex service where errors propagate through multiple layers. This Skill guides you on how to wrap errors at each layer with relevant context and how to inspect the full error chain at the top level to identify the root cause.
Quick Start
Provide guidance on implementing Go error wrapping across multiple application layers.
Dependency Matrix
Required Modules
None requiredComponents
references
💻 Claude Code Installation
Recommended: Let Claude install automatically. Simply copy and paste the text below to Claude Code.
Please help me install this Skill: Name: go-error Download link: https://github.com/victorzhuk/go-ent/archive/main.zip#go-error Please download this .zip file, extract it, and install it in the .claude/skills/ directory.
Agent Skills Search Helper
Install a tiny helper to your Agent, search and equip skill from 471,000+ vetted skills library on demand.