MCPcopy Create free account
hub / github.com/devfeel/dotweb / ExcludeUse

Method ExcludeUse

dotweb.go:229–238  ·  view source on GitHub ↗

ExcludeUse registers a middleware exclude routers like exclude /index or /query/:id

(m Middleware, routers ...string)

Source from the content-addressed store, hash-verified

227// ExcludeUse registers a middleware exclude routers
228// like exclude /index or /query/:id
229func (app *DotWeb) ExcludeUse(m Middleware, routers ...string) {
230 middlewareLen := len(app.Middlewares)
231 if m != nil {
232 m.Exclude(routers...)
233 if middlewareLen > 0 {
234 app.Middlewares[middlewareLen-1].SetNext(m)
235 }
236 app.Middlewares = append(app.Middlewares, m)
237 }
238}
239
240// UsePlugin registers plugins
241func (app *DotWeb) UsePlugin(plugins ...Plugin) {

Callers 1

mainFunction · 0.80

Calls 2

ExcludeMethod · 0.65
SetNextMethod · 0.65

Tested by

no test coverage detected