golang-samber-oops
CommunityStructured Go error handling with context.
Software Engineering#golang#go#error-handling#context-propagation#panic-recovery#structured-errors#oops
Authorsamber
Version1.0.0
Installs0
System Documentation
What problem does it solve?
Go developers often struggle with errors that lack context, making debugging and incident response slow. samber/oops provides a fluent builder to attach domain, error codes, user-facing messages, and structured attributes so errors travel with rich context across service boundaries.
Core Features & Use Cases
- Structured context via .In(), .With(), .User(), .Tenant(), and .Wrapf() to preserve context as errors propagate.
- Stack traces, machine-readable codes, and a public vs technical message system to improve observability and user experience.
- Context propagation with WithBuilder/FromContext and Recover to convert panics into well-formed errors.
- Per-layer context enrichment (handler/service/repository) with targeted attributes and tagging.
Quick Start
Build an oops error with In("service"), With("operation","checkout"), and Wrapf(err, "operation failed") to propagate rich context.
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: golang-samber-oops Download link: https://github.com/samber/cc-skills-golang/archive/main.zip#golang-samber-oops 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.