1
0
mirror of https://github.com/labstack/echo.git synced 2024-11-24 08:22:21 +02:00

Bumped v4.1.5

Signed-off-by: Vishal Rana <vr@labstack.com>
This commit is contained in:
Vishal Rana 2019-04-29 22:54:49 -07:00
parent 64c6d92295
commit 5d2c33ad5d
3 changed files with 4 additions and 7 deletions

View File

@ -224,7 +224,7 @@ const (
const ( const (
// Version of Echo // Version of Echo
Version = "4.1.4" Version = "4.1.5"
website = "https://echo.labstack.com" website = "https://echo.labstack.com"
// http://patorjk.com/software/taag/#p=display&f=Small%20Slant&t=Echo // http://patorjk.com/software/taag/#p=display&f=Small%20Slant&t=Echo
banner = ` banner = `

View File

@ -25,11 +25,8 @@ func (g *Group) Use(middleware ...MiddlewareFunc) {
} }
// Allow all requests to reach the group as they might get dropped if router // Allow all requests to reach the group as they might get dropped if router
// doesn't find a match, making none of the group middleware process. // doesn't find a match, making none of the group middleware process.
for _, p := range []string{"", "/*"} { g.Any("", NotFoundHandler)
g.Any(p, func(c Context) error { g.Any("/*", NotFoundHandler)
return NotFoundHandler(c)
})
}
} }
// CONNECT implements `Echo#CONNECT()` for sub-routes within the Group. // CONNECT implements `Echo#CONNECT()` for sub-routes within the Group.

View File

@ -57,7 +57,7 @@ func NewRouter(e *Echo) *Router {
func (r *Router) Add(method, path string, h HandlerFunc) { func (r *Router) Add(method, path string, h HandlerFunc) {
// Validate path // Validate path
if path == "" { if path == "" {
panic("echo: path cannot be empty") path = "/"
} }
if path[0] != '/' { if path[0] != '/' {
path = "/" + path path = "/" + path