Route returns the matched Route struct.
()
| 364 | |
| 365 | // Route returns the matched Route struct. |
| 366 | func (c *DefaultCtx) Route() *Route { |
| 367 | if c.route == nil { |
| 368 | // Fallback for fasthttp error handler; equals c.Method() without |
| 369 | // the variadic call so Route stays within the inlining budget |
| 370 | return &Route{ |
| 371 | path: c.pathOriginal, |
| 372 | Path: c.pathOriginal, |
| 373 | Method: c.app.method(c.methodInt), |
| 374 | Handlers: emptyRouteHandlers[:], |
| 375 | Params: emptyRouteParams[:], |
| 376 | } |
| 377 | } |
| 378 | return c.route |
| 379 | } |
| 380 | |
| 381 | // FullPath returns the matched route path, including any group prefixes. |
| 382 | func (c *DefaultCtx) FullPath() string { |