Registry / utility / go-macaron-inject

go-macaron-inject

JSON →
library0.0.0-20200308113650-138e5925c53bgogounverified

Package inject provides utilities for mapping and injecting dependencies in various ways.

go get github.com/go-macaron/inject
INSTALL
IMPORT
SIG · GO-MACARON-INJECT
G
go-macaron-inject
utilitygov0.0.0-20200308113650-138e5925c53b
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.

inject
github.com/go-macaron/inject

Creates an injector, maps a struct, and invokes a function that receives the mapped dependency.

package main import ( "fmt" "github.com/go-macaron/inject" ) type MyStruct struct { Name string } func main() { inj := inject.New() inj.Map(&MyStruct{Name: "Hello"}) var s *MyStruct inj.Invoke(func(s *MyStruct) { fmt.Println(s.Name) }) }
Debug
Known issues

No known issues recorded.

Upgrade
Version history
0.0.0-20200308113650-138e5925c53blatest on pkg.go.dev
Audit
Dependencies

No dependency data recorded yet.

Agent activity
4 hits · last 30 days
node
4
Resources
go-macaron-inject — go get go-macaron-inject · libregistry