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 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-wire`, `samber/cc-skills-golang@golang-uber-dig`, `samber/cc-skills-golang@golang-uber-fx`, or `samber/cc-skills-golang@golang-samber-do` skills.

om-scogo 040f2a1 4 files · 37.2 KB Updated 0 repo stars

File contents

om-scogo/skillsh-scraper/tree/main/data/skills/samber-cc-skills-golang/golang-dependency-injection commit 040f2a1052

Frequently asked questions

npx skillmds add om-scogo/golang-dependency-injection