1
0
mirror of https://github.com/labstack/echo.git synced 2024-12-24 20:14:31 +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 (
// Version of Echo
Version = "4.1.4"
Version = "4.1.5"
website = "https://echo.labstack.com"
// http://patorjk.com/software/taag/#p=display&f=Small%20Slant&t=Echo
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
// doesn't find a match, making none of the group middleware process.
for _, p := range []string{"", "/*"} {
g.Any(p, func(c Context) error {
return NotFoundHandler(c)
})
}
g.Any("", NotFoundHandler)
g.Any("/*", NotFoundHandler)
}
// 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) {
// Validate path
if path == "" {
panic("echo: path cannot be empty")
path = "/"
}
if path[0] != '/' {
path = "/" + path