Go Dependency Injection

Dependency injection in Go: constructor injection, wiring in main, avoiding global state, and when frameworks (wire, fx, dig) earn their complexity. Use when: "dependency injection", "wire up dependencies", "inject this", "remove global state", "singleton in Go", "use google/wire", "uber fx", "make this testable". Not for: interface design (go-interface-design), directory structure (go-project-layout), test doubles and mocks (go-test-quality).

gabrielmoreira Updated 17 repo stars

File contents

gabrielmoreira/agent-skills-mirror/tree/main/mirrors/repos/eduardo-sl@go-agent-skills/skills/(architecture)/go-dependency-injection commit 2c68dff49f

Frequently asked questions

npx skillmds@latest add gabrielmoreira/go-dependency-injection