Skip to content

Commit

Permalink
Update router.go
Browse files Browse the repository at this point in the history
  • Loading branch information
sunnanping committed Jun 9, 2021
1 parent f992bc4 commit 585e2da
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions router.go
Expand Up @@ -313,8 +313,8 @@ func (r *Router) Handle(method, path string, handles ...Handle) {
if len(path) < 1 || path[0] != '/' {
panic("path must begin with '/' in path '" + path + "'")
}
if handles == nil {
panic("handle must not be nil")
if handles == nil || len(handles)==0 {
panic("handles must not be nil")
}

if r.SaveMatchedRoutePath {
Expand Down

0 comments on commit 585e2da

Please sign in to comment.