
Description
golang-samber-do is an agent skill from the samber cc-skills-golang collection for setting up dependency injection in Go with the samber/do library. The library is a type-safe dependency injection toolkit built on Go 1.18 generics, and the skill covers service containers, lifecycle management, scopes, health checks, graceful shutdown and organising modules. Its persona is a Go architect who keeps the container at the composition root, depends on interfaces rather than concrete types, and treats provider errors as first-class failures. The skill tells the agent to register services as providers, to resolve them through the container, and to tie their start and stop to the application's lifecycle so that shutdown is graceful. Scopes are used to give each request or unit of work its own dependencies where that is needed. Health checks let the container report whether each service is ready. The library's official references are the package documentation on pkg.go.dev, the documentation site at do.samber.dev and the repository, and the skill notes that it is not exhaustive, so current signatures should be checked in those sources. It is useful for teams whose service wiring has grown complicated and who want one explicit place where dependencies are assembled. It is listed on skills.sh, where the page shows install counts and GitHub stars for the collection. Install it with npx skills add https://github.com/samber/cc-skills-golang --skill golang-samber-do.…
Highlights
- Type-safe container on Go generics
- Lifecycle and graceful shutdown
- Scopes and health checks
- Container at the composition root
- Module organisation
- Installs from skills.sh
Ratings & Reviews
No ratings yet
Be the first to rate golang-samber-do.
People also visit
golang-samber-do FAQ
What is samber/do?
A type-safe dependency injection toolkit for Go, built on generics from Go 1.18.
What does the skill cover?
Service containers, lifecycle management, scopes, health checks, graceful shutdown and module organisation.
Where should the container live?
At the composition root, according to the skill's persona.
How do I install it?
Run npx skills add https://github.com/samber/cc-skills-golang --skill golang-samber-do.
How popular is it?
The skills.sh page lists the skill in the cc-skills-golang collection, which has 3.5K GitHub stars.
What are the best golang-samber-do alternatives?
Popular alternatives to golang-samber-do include golang-dependency-injection, go-concurrency-patterns and java-springboot. See all golang-samber-do alternatives


