MCPcopy Create free account
hub / github.com/alecthomas/inject / Mapping

Function Mapping

annotations.go:243–245  ·  view source on GitHub ↗

Mapping annotates a provider or binding to indicate it is part of a mapping of keys to values. injector.Bind(Mapping(map[string]int{"one": 1})) injector.Bind(Mapping(map[string]int{"two": 2})) injector.Provide(Mapping(func() map[string]int { return map[string]int{"three": 3} })) expected :

(v interface{})

Source from the content-addressed store, hash-verified

source not stored for this graph (policy: none)

Callers 3

TestMappingAnnotationFunction · 0.85
InstallMethod · 0.85

Calls

no outgoing calls

Tested by 2

TestMappingAnnotationFunction · 0.68