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

Function Load

middleware/rewrite/rewrite.go:86–93  ·  view source on GitHub ↗

Load decodes the "filename" options and returns a new Rewrite Engine Router Wrapper. It panics on errors. Usage: redirects := Load("redirects.yml") app.WrapRouter(redirects) See `New` too.

(filename string)

Source from the content-addressed store, hash-verified

84// app.WrapRouter(redirects)
85// See `New` too.
86func Load(filename string) router.WrapperFunc {
87 opts := LoadOptions(filename)
88 engine, err := New(opts)
89 if err != nil {
90 panic(err)
91 }
92 return engine.Rewrite
93}
94
95// New returns a new Rewrite Engine based on "opts".
96// It reports any parser error.

Callers 1

mainFunction · 0.92

Calls 2

LoadOptionsFunction · 0.85
NewFunction · 0.70

Tested by

no test coverage detected

Used in the wild real call sites across dependent graphs

searching dependent graphs…