Skip to content

Commit

Permalink
Revert "Fix parameter routes with an extension (/foo/:id.json)"
Browse files Browse the repository at this point in the history
This reverts commit cf7b555.
  • Loading branch information
vishr committed Apr 12, 2018
1 parent 38f27e2 commit f526774
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion router.go
Original file line number Diff line number Diff line change
Expand Up @@ -68,7 +68,7 @@ func (r *Router) Add(method, path string, h HandlerFunc) {
j := i + 1

r.insert(method, path[:i], nil, skind, "", nil)
for ; i < l && path[i] != '/' && path[i] != '.'; i++ {
for ; i < l && path[i] != '/'; i++ {
}

pnames = append(pnames, path[j:i])
Expand Down

0 comments on commit f526774

Please sign in to comment.