Skip to content

Commit

Permalink
[other] gofmt
Browse files Browse the repository at this point in the history
  • Loading branch information
dinever committed Feb 24, 2017
1 parent 3776f33 commit 2a086bb
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions router.go
Original file line number Diff line number Diff line change
Expand Up @@ -90,11 +90,11 @@ func (router *router) AddRoute(method string, path string, handler HandlerFunc)
rootNode.addRoute(parts, names, handler)

if path == "/" {
} else if path[len(path) - 1] != '/' {
} else if path[len(path)-1] != '/' {
parts, names := splitURLPath(path + "/")
rootNode.addRoute(parts, names, handler)
} else {
parts, names := splitURLPath(path[:len(path) - 1])
parts, names := splitURLPath(path[:len(path)-1])
rootNode.addRoute(parts, names, handler)
}
rootNode.optimizeRoutes()
Expand Down

0 comments on commit 2a086bb

Please # to comment.