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

Method make

container.go:21–32  ·  view source on GitHub ↗

make resolves the binding if needed and returns the resolved concrete.

(c Container)

Source from the content-addressed store, hash-verified

19
20// make resolves the binding if needed and returns the resolved concrete.
21func (b *binding) make(c Container) (interface{}, error) {
22 if b.concrete != nil {
23 return b.concrete, nil
24 }
25
26 retVal, err := c.invoke(b.resolver)
27 if b.isSingleton {
28 b.concrete = retVal
29 }
30
31 return retVal, err
32}
33
34// Container holds the bindings and provides methods to interact with them.
35// It is the entry point in the package.

Callers 3

argumentsMethod · 0.80
NamedResolveMethod · 0.80
FillMethod · 0.80

Calls 1

invokeMethod · 0.80

Tested by

no test coverage detected