build(deps): bump github.com/labstack/echo/v4 from 4.7.2 to 4.8.0
Bumps [github.com/labstack/echo/v4](https://github.com/labstack/echo) from 4.7.2 to 4.8.0. - [Release notes](https://github.com/labstack/echo/releases) - [Changelog](https://github.com/labstack/echo/blob/master/CHANGELOG.md) - [Commits](https://github.com/labstack/echo/compare/v4.7.2...v4.8.0) --- updated-dependencies: - dependency-name: github.com/labstack/echo/v4 dependency-type: direct:production update-type: version-update:semver-minor ... Signed-off-by: dependabot[bot] <support@github.com>
This commit is contained in:
parent
98a7457e08
commit
d75e01aef0
14 changed files with 439 additions and 197 deletions
20
vendor/github.com/labstack/echo/v4/echo.go
generated
vendored
20
vendor/github.com/labstack/echo/v4/echo.go
generated
vendored
|
|
@ -183,6 +183,8 @@ const (
|
|||
PROPFIND = "PROPFIND"
|
||||
// REPORT Method can be used to get information about a resource, see rfc 3253
|
||||
REPORT = "REPORT"
|
||||
// RouteNotFound is special method type for routes handling "route not found" (404) cases
|
||||
RouteNotFound = "echo_route_not_found"
|
||||
)
|
||||
|
||||
// Headers
|
||||
|
|
@ -246,7 +248,7 @@ const (
|
|||
|
||||
const (
|
||||
// Version of Echo
|
||||
Version = "4.7.2"
|
||||
Version = "4.8.0"
|
||||
website = "https://echo.labstack.com"
|
||||
// http://patorjk.com/software/taag/#p=display&f=Small%20Slant&t=Echo
|
||||
banner = `
|
||||
|
|
@ -480,8 +482,21 @@ func (e *Echo) TRACE(path string, h HandlerFunc, m ...MiddlewareFunc) *Route {
|
|||
return e.Add(http.MethodTrace, path, h, m...)
|
||||
}
|
||||
|
||||
// Any registers a new route for all HTTP methods and path with matching handler
|
||||
// RouteNotFound registers a special-case route which is executed when no other route is found (i.e. HTTP 404 cases)
|
||||
// for current request URL.
|
||||
// Path supports static and named/any parameters just like other http method is defined. Generally path is ended with
|
||||
// wildcard/match-any character (`/*`, `/download/*` etc).
|
||||
//
|
||||
// Example: `e.RouteNotFound("/*", func(c echo.Context) error { return c.NoContent(http.StatusNotFound) })`
|
||||
func (e *Echo) RouteNotFound(path string, h HandlerFunc, m ...MiddlewareFunc) *Route {
|
||||
return e.Add(RouteNotFound, path, h, m...)
|
||||
}
|
||||
|
||||
// Any registers a new route for all HTTP methods (supported by Echo) and path with matching handler
|
||||
// in the router with optional route-level middleware.
|
||||
//
|
||||
// Note: this method only adds specific set of supported HTTP methods as handler and is not true
|
||||
// "catch-any-arbitrary-method" way of matching requests.
|
||||
func (e *Echo) Any(path string, handler HandlerFunc, middleware ...MiddlewareFunc) []*Route {
|
||||
routes := make([]*Route, len(methods))
|
||||
for i, m := range methods {
|
||||
|
|
@ -515,6 +530,7 @@ func (e *Echo) File(path, file string, m ...MiddlewareFunc) *Route {
|
|||
func (e *Echo) add(host, method, path string, handler HandlerFunc, middleware ...MiddlewareFunc) *Route {
|
||||
name := handlerName(handler)
|
||||
router := e.findRouter(host)
|
||||
// FIXME: when handler+middleware are both nil ... make it behave like handler removal
|
||||
router.Add(method, path, func(c Context) error {
|
||||
h := applyMiddleware(handler, middleware...)
|
||||
return h(c)
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue