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

Function MustResolve

must.go:67–71  ·  view source on GitHub ↗

MustResolve wraps the `Resolve` method and panics on errors instead of returning the errors.

(c Container, abstraction interface{})

Source from the content-addressed store, hash-verified

65
66// MustResolve wraps the `Resolve` method and panics on errors instead of returning the errors.
67func MustResolve(c Container, abstraction interface{}) {
68 if err := c.Resolve(abstraction); err != nil {
69 panic(err)
70 }
71}
72
73// MustNamedResolve wraps the `NamedResolve` method and panics on errors instead of returning the errors.
74func MustNamedResolve(c Container, abstraction interface{}, name string) {

Callers

nothing calls this directly

Calls 1

ResolveMethod · 0.80

Tested by

no test coverage detected

Used in the wild real call sites across dependent graphs

searching dependent graphs…