MCPcopy Index your code
hub / github.com/labstack/echo / Use

Method Use

echo.go:489–492  ·  view source on GitHub ↗

Use adds middleware to the chain which is run after router has found matching route and before route/request handler method is executed.

(middleware ...MiddlewareFunc)

Source from the content-addressed store, hash-verified

487
488// Use adds middleware to the chain which is run after router has found matching route and before route/request handler method is executed.
489func (e *Echo) Use(middleware ...MiddlewareFunc) {
490 e.middleware = append(e.middleware, middleware...)
491 e.buildRouterChains()
492}
493
494// CONNECT registers a new CONNECT route for a path with matching handler in the
495// router with optional route-level middleware. Panics on error.

Calls 1

buildRouterChainsMethod · 0.95