mirror of
https://github.com/labstack/echo.git
synced 2024-12-24 20:14:31 +02:00
Added a method to return routers map
Signed-off-by: Vishal Rana <vr@labstack.com>
This commit is contained in:
parent
c8e923cf54
commit
46ae04bef2
7
echo.go
7
echo.go
@ -325,11 +325,16 @@ func (e *Echo) NewContext(r *http.Request, w http.ResponseWriter) Context {
|
||||
}
|
||||
}
|
||||
|
||||
// Router returns router.
|
||||
// Router returns the default router.
|
||||
func (e *Echo) Router() *Router {
|
||||
return e.router
|
||||
}
|
||||
|
||||
// Routers returns the map of host => router.
|
||||
func (e *Echo) Routers() map[string]*Router {
|
||||
return e.routers
|
||||
}
|
||||
|
||||
// DefaultHTTPErrorHandler is the default HTTP error handler. It sends a JSON response
|
||||
// with status code.
|
||||
func (e *Echo) DefaultHTTPErrorHandler(err error, c Context) {
|
||||
|
Loading…
Reference in New Issue
Block a user