golang-samber-do
CommunityGo DI with type-safe, scalable containers.
Software Engineering#testing#golang#dependency-injection#graceful-shutdown#scopes#health-checks#do-v2
Authorsamber
Version1.0.0
Installs0
System Documentation
What problem does it solve?
Dependency injection in Go projects can become boilerplate-prone and hard to test; this skill provides a structured approach using samber/do/v2 to compose services, manage lifecycles, and enable clean testing.
Core Features & Use Cases
- Type-safe DI container at the composition root with clear lifecycle management (lazy, eager, transient, value)
- Support for scoped containers, named services, and implicit/explicit aliasing
- Built-in testing patterns: container cloning and overrides for isolated tests
- Health checks and graceful shutdown hooks integrated with the DI container
- Encourages modular package organization via do.Package for infrastructure, domain, and transport layers
Quick Start
Create a root injector with do.New(), register services with do.Provide or do.ProvideValue, and resolve them with do.MustInvoke.
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-samber-do Download link: https://github.com/samber/cc-skills-golang/archive/main.zip#golang-samber-do 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.