Giverny

Golang Dependency Injection

Comprehensive guide for dependency injection (DI) in Golang. Covers why DI matters (testability, loose coupling, separation of concerns, lifecycle management), manual constructor…

by samber★ 4,015Languages

What Golang Dependency Injection does

Comprehensive guide for dependency injection (DI) in Golang. Covers why DI matters (testability, loose coupling, separation of concerns, lifecycle management), manual constructor injection, and DI library comparison (google/wire, uber-go/dig, uber-go/fx, samber/do). Use this skill when designing service architecture, setting up dependency injection, refactoring tightly coupled code, managing singletons or service factories, or when the user asks about inversion of control, service containers, or wiring dependencies in Go. For a specific DI library, → See `samber/cc-skills-golang@golang-google-

How to install Golang Dependency Injection in Claude Code

Giverny gives you a ready prompt with the exact install command from samber/cc-skills-golang. Sign in with GitHub, copy the prompt and paste it into Claude Code; Claude installs the skill and confirms it loaded. To install by hand, clone samber/cc-skills-golang and copy the skills/golang-dependency-injection folder into ~/.claude/skills/.

How to use it

Once installed, Claude loads Golang Dependency Injection on its own whenever your request matches what the skill does. You can also ask for it by name, for example: “Use the golang-dependency-injection skill on my current project.”

More Claude skills for languages