MCPcopy
hub / github.com/gorilla/mux / Use

Method Use

middleware.go:24–28  ·  view source on GitHub ↗

Use appends a MiddlewareFunc to the chain. Middleware can be used to intercept or otherwise modify requests and/or responses, and are executed in the order that they are applied to the Router.

(mwf ...MiddlewareFunc)

Source from the content-addressed store, hash-verified

22
23// Use appends a MiddlewareFunc to the chain. Middleware can be used to intercept or otherwise modify requests and/or responses, and are executed in the order that they are applied to the Router.
24func (r *Router) Use(mwf ...MiddlewareFunc) {
25 for _, fn := range mwf {
26 r.middlewares = append(r.middlewares, fn)
27 }
28}
29
30// useInterface appends a middleware to the chain. Middleware can be used to intercept or otherwise modify requests and/or responses, and are executed in the order that they are applied to the Router.
31func (r *Router) useInterface(mw middleware) {

Calls

no outgoing calls