Skip to content
Permalink
Browse files

updating logic in route matcher, cleaner and saner (#235)

  • Loading branch information
ShaneSaww authored and kisielk committed Feb 28, 2017
1 parent 999ef73 commit ad4ce0eb1694e1a48fd8e2e764dd0e1aec118326
Showing with 1 addition and 1 deletion.
  1. +1 −1 route.go
@@ -153,7 +153,7 @@ func (r *Route) addRegexpMatcher(tpl string, matchHost, matchPrefix, matchQuery
}
r.regexp = r.getRegexpGroup()
if !matchHost && !matchQuery {
if tpl == "/" && (len(tpl) == 0 || tpl[0] != '/') {
if len(tpl) > 0 && tpl[0] != '/' {
return fmt.Errorf("mux: path must start with a slash, got %q", tpl)
}
if r.regexp.path != nil {

0 comments on commit ad4ce0e

Please sign in to comment.
You can’t perform that action at this time.