samber/do
⚙️ A dependency injection toolkit based on Go 1.18+ Generics. observed · 2026-08-28
Health v2 · maintenance only
86/100
- Activity 99
- Release rhythm 61
- Longevity 100
How is this computed?
round(0.45*activity + 0.35*rhythm + 0.20*longevity); archived -> min(score, 10) — computed 2026-09-03. Adoption (stars, forks) is never an input.
- gap_med: 301
- age_days: 1569
- days_rel: 44
- days_push: 8
- n_releases_24m: 2
Adoption not part of the score
2794 stars · 109 forks observed · 2026-08-28
What it is AI-extracted, prompt v1, taxonomy v1, 2026-08-30, confidence not recorded
samber/do is a dependency injection toolkit for Go 1.18+ built on generics, offering a type-safe, reflection-free API with no external dependencies. It provides service registration and invocation, scope trees, health checks, graceful shutdown, and dependency graph debugging tools including a Web UI.
Use cases
- wire up services in a Go application with compile-time type safety
- replace uber/dig or uber/fx with a generics-based DI container
- manage service lifecycle with health checks and graceful shutdown
- organize services into scoped modules with visibility control
- visualize and debug a service dependency graph
- avoid code generation steps like google/wire in the build pipeline
When to choose
- you want compile-time-checked dependency resolution without a build step
- you need built-in health checks and dependency-aware graceful shutdown
- you want zero external dependencies and no reflection
- you need runtime flexibility like conditional registration, overrides, and scopes
When to avoid
- you want zero runtime cost and a fully static graph (use google/wire)
- you're building a large modular app that benefits from uber/fx's batteries-included framework
- you prefer a minimal reflection-based container to build your own framework on (use uber/dig)
Facets
library · maturity stable
middleware developer-tools configuration-management developer-tools backend apis go cross-platform dependency-injection generics ioc-container service-lifecycle healthcheck graceful-shutdown type-safe no-codegen
7 sources
- readme: https://github.com/samber/do · fetched 2026-08-28 · 77cd16cadee6
- homepage: https://do.samber.dev · fetched 2026-08-29 · 9ab3031b1a5c
- site_page: https://do.samber.dev/docs/comparison/samber-do-vs-uber-fx · fetched 2026-08-29 · 360b64411afd
- site_page: https://do.samber.dev/docs/comparison/samber-do-vs-google-wire · fetched 2026-08-29 · 1f579816c550
- site_page: https://do.samber.dev/docs/comparison/samber-do-vs-uber-dig · fetched 2026-08-29 · 4ec1367d78b9
- site_page: https://do.samber.dev/docs/about · fetched 2026-08-29 · f76a3af202fd
- site_page: https://do.samber.dev/docs/getting-started · fetched 2026-08-29 · 57184d6964aa
Member repositories
| Repository | Role | Health v2 |
|---|---|---|
| samber/do | main | 86 |
For agents
Data as of 2026-08-30T08:39:29.467469+00:00 · Report a problem