Lightlines
By samber

golang-samber-do

samber34.8k installs

Give your Go services clear lifetimes with samber/do.

What it does

Guides Go projects toward modular dependency injection with samber/do and managed service lifecycles.

When to use it

Use when adopting samber/do, working in a codebase that imports it, or replacing manual constructor injection with a container.

How to use it

It changes how the agent wires Go services by keeping the container at the composition root, depending on interfaces, and handling provider errors.

What you provide

  • An existing project

Latest review

What you need · 1

Requires Go 1.18 or later for the generics-based dependency injection toolkit.


Access · 0

No additional actions listed.