
Golang Uber Dig
Reflection-based DI container for Go with Provide/Invoke, named values, value groups, and interface binding.
- skills.sh installs
- 38.4K
- GitHub stars
- 3.9K
- last updated
- Aug 21, 2026
What it does
- Covers Provide and Invoke, dig.In and dig.Out parameter and result objects, named values, value groups, and dig.As interface binding
- Explains the container options
DeferAcyclicVerification,RecoverFromPanics, andDryRun, plus optional and flattened group dependencies - Contrasts dig with fx, noting dig has no lifecycle hooks, module system, or signal-aware run loop
- Designed for CLI tools, libraries, and test harnesses that need only the wiring graph, not a full service framework
Install
$ npx -y skills add samber/cc-skills-golang --skill golang-uber-dig -yInstalls into .agents/skills for every agent it finds here, and .claude/skills for Claude Code.
Files
Persona: You are a Go architect wiring an application graph with dig. You keep the container at the composition root, depend on interfaces not concrete types, and treat constructor errors as first-class failures.
Using uber-go/dig for Dependency Injection in Go
Reflection-based DI toolkit, designed to power application frameworks (it is the engine behind uber-go/fx) and resolve object graphs during startup.
Official Resources:
This skill is not exhaustive — refer to library documentation and code examples for more information:
- For Go package docs, symbols, versions, importers, and known vulnerabilities, → See
samber/cc-skills-golang@golang-pkg-go-devskill (godig), preferred over Context7 for Go package facts. - To navigate this library's usage in your own code (definitions, call sites, diagnostics), → See
samber/cc-skills-golang@golang-goplsskill (gopls). - Context7 remains a fallback for docs not indexed on pkg.go.dev.
go get go.uber.org/dig
dig vs. fx
Details
- Repository
- github.com/samber/cc-skills-golang
- Category
- Go
- First seen
- May 16, 2026
More from samber/cc-skills-golang
All 47- Golang How To38.3K
- Golang Linter26.5K
- Golang Pkg Go Dev13.7K
- Golang Refactoring13.3K
- Golang Gopls12.9K
- Golang Code Style46.6K
- Golang Testing45.9K
- Golang Error Handling45.9K
- Golang Security44.7K
- Golang Design Patterns44.3K
- Golang Performance44.1K
- Golang Concurrency44.1K
- Golang Context43.2K
- Golang Database43K
- Golang Naming43K
- Golang Safety42.7K
- Golang Project Layout42.5K
- Golang Documentation42.4K
- Golang Modernize42.4K
- Golang Lint42.3K
- Golang Data Structures42.3K
- Golang Troubleshooting42K
- Golang Observability42K
- Golang Dependency Management41.8K
Similar to Golang Uber Dig
More Go
golang-dependency-injectionSkillsamber/cc-skills-golang41.4K installsGo dependency injection guide covering manual constructor wiring and four DI library options compared.
golang-uber-fxSkillsamber/cc-skills-golang38.4K installsDependency-injection and lifecycle framework for Go services built on uber-go/fx, covering modules, hooks, and signal-aware runs.
factoryPluginhmlongco/Factory2.9K starsIn-depth guide to Factory, a container-based DI system for Swift and SwiftUI.
go-contextSkillcxuu/golang-skills1.3K installsGo context conventions covering placement, cancellation, deadlines, and when to store values in context.
golang-proSkillsickn33/agentic-awesome-skills455 installsExpert Go 1.21+ guidance for concurrency, performance tuning, and production-ready microservices with testing and profiling.
go-interfacesSkillcxuu/golang-skills1.4K installsGo interfaces guidance for accepting interfaces, returning concrete types, and safe type assertions.