golang-patterns
CommunityAdopt idiomatic Go for clean, reliable code.
Authorflag3
Version1.0.0
Installs0
System Documentation
What problem does it solve?
Go developers often struggle to apply idiomatic patterns that balance clarity, correctness, and maintainability. This skill consolidates proven Go patterns into practical guidance to elevate code quality.
Core Features & Use Cases
- Simplicity and Clarity: Favor straightforward designs over clever hacks.
- Interface-First Design: Accept interfaces and return concrete types to enable flexible composition.
- Robust Error Handling: Use wrapping, sentinel errors, and error inspection to provide context.
- Concurrency Patterns: Implement worker pools and context-based cancellation for scalable tasks.
- Practical Scenarios: Refactor a service to use interfaces and error wrapping and add a worker pool for background tasks.
Quick Start
Start by outlining a small Go module that applies the patterns: define a service interface, implement a concrete type, wrap errors, and add a simple worker pool to process jobs.
Dependency Matrix
Required Modules
None requiredComponents
Standard package💻 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-patterns Download link: https://github.com/flag3/dotfiles/archive/main.zip#golang-patterns 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.