MCPcopy Create free account
hub / github.com/golobby/container / Reset

Method Reset

container.go:135–139  ·  view source on GitHub ↗

Reset deletes all the existing bindings and empties the container.

()

Source from the content-addressed store, hash-verified

133
134// Reset deletes all the existing bindings and empties the container.
135func (c Container) Reset() {
136 for k := range c {
137 delete(c, k)
138 }
139}
140
141// Singleton binds an abstraction to concrete in singleton mode.
142// It takes a resolver function that returns the concrete, and its return type matches the abstraction (interface).

Callers 15

ResetFunction · 0.80
TestSingletonFunction · 0.80
TestSingletonLazyFunction · 0.80
TestNamedSingletonFunction · 0.80
TestNamedSingletonLazyFunction · 0.80
TestTransientFunction · 0.80
TestTransientLazyFunction · 0.80
TestNamedTransientFunction · 0.80
TestNamedTransientLazyFunction · 0.80
TestCallFunction · 0.80
TestResolveFunction · 0.80
TestNamedResolveFunction · 0.80

Calls

no outgoing calls

Tested by 15

TestSingletonFunction · 0.64
TestSingletonLazyFunction · 0.64
TestNamedSingletonFunction · 0.64
TestNamedSingletonLazyFunction · 0.64
TestTransientFunction · 0.64
TestTransientLazyFunction · 0.64
TestNamedTransientFunction · 0.64
TestNamedTransientLazyFunction · 0.64
TestCallFunction · 0.64
TestResolveFunction · 0.64
TestNamedResolveFunction · 0.64
TestFillFunction · 0.64