MCPcopy
hub / github.com/labstack/echo / RouteInfo

Method RouteInfo

context.go:275–280  ·  view source on GitHub ↗

RouteInfo returns current request route information. Method, Path, Name and params if they exist for matched route. RouteInfo returns generic "empty" struct for these cases: * Context is accessed before Routing is done. For example inside Pre middlewares (`e.Pre()`) * Router did not find matching r

()

Source from the content-addressed store, hash-verified

273// * Router did not find matching route - 404 (route not found)
274// * Router did not find matching route with same method - 405 (method not allowed)
275func (c *Context) RouteInfo() RouteInfo {
276 if c.route != nil {
277 return c.route.Clone()
278 }
279 return RouteInfo{}
280}
281
282// Param returns path parameter by name.
283func (c *Context) Param(name string) string {

Calls 1

CloneMethod · 0.45