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

Method useInterface

middleware.go:31–33  ·  view source on GitHub ↗

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.

(mw middleware)

Source from the content-addressed store, hash-verified

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) {
32 r.middlewares = append(r.middlewares, mw)
33}
34
35// CORSMethodMiddleware automatically sets the Access-Control-Allow-Methods response header
36// on requests for routes that have an OPTIONS method matcher to all the method matchers on

Callers 3

TestMiddlewareAddFunction · 0.95
TestMiddlewareFunction · 0.95
TestMiddlewareSubrouterFunction · 0.95

Calls

no outgoing calls

Tested by 3

TestMiddlewareAddFunction · 0.76
TestMiddlewareFunction · 0.76
TestMiddlewareSubrouterFunction · 0.76