MCPcopy Create free account
hub / github.com/kataras/iris / MustLoad

Function MustLoad

auth/auth.go:90–97  ·  view source on GitHub ↗

MustLoad binds a filename (fullpath) configuration yaml or json and constructs a new Auth instance. It panics on error.

(filename string)

Source from the content-addressed store, hash-verified

88// MustLoad binds a filename (fullpath) configuration yaml or json
89// and constructs a new Auth instance. It panics on error.
90func MustLoad[T User](filename string) *Auth[T] {
91 var config Configuration
92 if err := config.BindFile(filename); err != nil {
93 panic(err)
94 }
95
96 return Must(New[T](config))
97}
98
99// Must is a helper that wraps a call to a function returning (*Auth[T], error)
100// and panics if the error is non-nil. It is intended for use in variable

Callers

nothing calls this directly

Calls 2

BindFileMethod · 0.95
MustFunction · 0.85

Tested by

no test coverage detected

Used in the wild real call sites across dependent graphs

searching dependent graphs…