Building Go applications that are easy to test and change starts with good design. Dependency injection is a key technique for this. It means giving a component what it needs instead of making it create those things itself.
This approach makes your code testable and loosely coupled. You can swap parts without breaking everything. You can use manual constructor injection or a library like Wire, Dig, Fx, or Do.
This guide explains why dependency injection matters and how to use it. It also helps you pick the right method for your project size and team.
Global
mkdir -p ~/.claude/skills/golang-dependency-injectionProject
mkdir -p .claude/skills/golang-dependency-injectionSource Repository
Typescript Advanced Typeswshobson/agents
Master advanced TypeScript types for safer and more flexible code
Python Executorqu-skills/skills
Execute Python code safely with 100+ libraries for data, scraping, and media
Golang Error Handlingsamber/cc-skills-golang
Learn to create, wrap, inspect, and log Go errors like a professional engineer
Golang Performancesamber/cc-skills-golang
Speed up your Go code using proven patterns for allocation reduction and CPU efficiency
Golang Design Patternssamber/cc-skills-golang
Idiomatic Go patterns for clean constructors error handling and graceful shutdown
Golang Concurrencysamber/cc-skills-golang
Write safe Go concurrency with goroutines, channels, and sync primitives
Golang Data Structuressamber/cc-skills-golang
Optimize Go data structures for speed and memory efficiency with internals knowledge
Golang Contextsamber/cc-skills-golang
Master Go context for cancellations, timeouts, and request values