diff options
Diffstat (limited to 'vendor/github.com/gorilla/mux/route.go')
-rw-r--r-- | vendor/github.com/gorilla/mux/route.go | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/vendor/github.com/gorilla/mux/route.go b/vendor/github.com/gorilla/mux/route.go index 293b6d493..922191592 100644 --- a/vendor/github.com/gorilla/mux/route.go +++ b/vendor/github.com/gorilla/mux/route.go @@ -153,7 +153,7 @@ func (r *Route) addRegexpMatcher(tpl string, matchHost, matchPrefix, matchQuery } r.regexp = r.getRegexpGroup() if !matchHost && !matchQuery { - if len(tpl) == 0 || tpl[0] != '/' { + if tpl == "/" && (len(tpl) == 0 || tpl[0] != '/') { return fmt.Errorf("mux: path must start with a slash, got %q", tpl) } if r.regexp.path != nil { |