Skip to content
This repository has been archived by the owner on Dec 23, 2023. It is now read-only.

Commit

Permalink
Simplify Router.Lookup
Browse files Browse the repository at this point in the history
  • Loading branch information
razonyang committed May 5, 2020
1 parent bcd112d commit 0afecd5
Showing 1 changed file with 0 additions and 6 deletions.
6 changes: 0 additions & 6 deletions router.go
Expand Up @@ -304,12 +304,6 @@ func (r *Router) Lookup(method, path string) (*Route, Params, bool) {
ps := make(Params, 0, r.maxParams)
if root := r.trees[method]; root != nil {
route, tsr := root.getValue(path, &ps, r.UseRawPath)
if route == nil {
return nil, nil, tsr
}
if ps == nil {
return route, nil, tsr
}
return route, ps, tsr
}
return nil, nil, false
Expand Down

0 comments on commit 0afecd5

Please sign in to comment.