File tree Expand file tree Collapse file tree 3 files changed +4
-7
lines changed Expand file tree Collapse file tree 3 files changed +4
-7
lines changed Original file line number Diff line number Diff line change @@ -224,7 +224,7 @@ const (
224
224
225
225
const (
226
226
// Version of Echo
227
- Version = "4.1.4 "
227
+ Version = "4.1.5 "
228
228
website = "https://echo.labstack.com"
229
229
// http://patorjk.com/software/taag/#p=display&f=Small%20Slant&t=Echo
230
230
banner = `
Original file line number Diff line number Diff line change @@ -25,11 +25,8 @@ func (g *Group) Use(middleware ...MiddlewareFunc) {
25
25
}
26
26
// Allow all requests to reach the group as they might get dropped if router
27
27
// doesn't find a match, making none of the group middleware process.
28
- for _ , p := range []string {"" , "/*" } {
29
- g .Any (p , func (c Context ) error {
30
- return NotFoundHandler (c )
31
- })
32
- }
28
+ g .Any ("" , NotFoundHandler )
29
+ g .Any ("/*" , NotFoundHandler )
33
30
}
34
31
35
32
// CONNECT implements `Echo#CONNECT()` for sub-routes within the Group.
Original file line number Diff line number Diff line change @@ -57,7 +57,7 @@ func NewRouter(e *Echo) *Router {
57
57
func (r * Router ) Add (method , path string , h HandlerFunc ) {
58
58
// Validate path
59
59
if path == "" {
60
- panic ( "echo: path cannot be empty" )
60
+ path = "/"
61
61
}
62
62
if path [0 ] != '/' {
63
63
path = "/" + path
You can’t perform that action at this time.
0 commit comments