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

Struct DefaultRouter

router.go:60–72  ·  view source on GitHub ↗

DefaultRouter is the registry of all registered routes for an `Echo` instance for request matching and URL path parameter parsing. Note: DefaultRouter is not coroutine-safe. Do not Add/Remove routes after HTTP server has been started with Echo.

Source from the content-addressed store, hash-verified

58// request matching and URL path parameter parsing.
59// Note: DefaultRouter is not coroutine-safe. Do not Add/Remove routes after HTTP server has been started with Echo.
60type DefaultRouter struct {
61 tree *node
62 notFoundHandler HandlerFunc
63 methodNotAllowedHandler HandlerFunc
64 optionsMethodHandler HandlerFunc
65 routes Routes
66 // maxPathParamsLength tracks highest count of PathValues for all routes.
67 maxPathParamsLength int
68
69 allowOverwritingRoute bool
70 unescapePathParamValues bool
71 useEscapedPathForRouting bool
72}
73
74// RouterConfig is configuration options for (default) router
75type RouterConfig struct {

Callers

nothing calls this directly

Calls

no outgoing calls

Tested by

no test coverage detected