golang-dependency-injection
CommunityGo DI patterns for clean, testable code.
Authorsamber
Version1.0.0
Installs0
System Documentation
What problem does it solve?
Provides structured guidance on implementing Dependency Injection (DI) in Go, including manual constructor injection, library comparisons, and best practices to avoid global state and init-time wiring.
Core Features & Use Cases
- Understand when to use manual DI vs libraries like google/wire, uber-go/dig, uber-go/fx, and samber/do.
- Learn design principles for testable, loosely coupled Go applications and strategies for lifecycle and mockability.
- Compare DI approaches across project sizes, with practical examples and decision guidance.
Quick Start
Wire up a small Go app in the main function by wiring infrastructure, repositories, and services with manual DI, then migrate to a DI library as the project grows.
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-dependency-injection Download link: https://github.com/samber/cc-skills-golang/archive/main.zip#golang-dependency-injection 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.