Registry / utility / samber-do

samber-do

JSON →
library1.6.0gogounverified

Do is a dependency injection container for Go.

go get github.com/samber/do
INSTALL
IMPORT
SIG · SAMBER-DO
S
samber-do
utilitygov1.6.0
harness data pending
Install & Compatibility
Where this runs

No compatibility data collected yet for this library.

Code
Verified usage

Verified import paths — ran on the pinned version, not inferred.

do
github.com/samber/do

Creates an injector, provides a string, and invokes it.

package main import "github.com/samber/do" func main() { injector := do.New() do.Provide(injector, func(i *do.Injector) (string, error) { return "hello", nil }) val, _ := do.Invoke[string](injector) println(val) }
Debug
Known issues

No known issues recorded.

Upgrade
Version history
1.6.0latest on pkg.go.dev
Audit
Dependencies

No dependency data recorded yet.

Agent activity
5 hits · last 30 days
node
4
Resources
samber-do — go get samber-do · libregistry