delete redundancy code

This commit is contained in:
youngblood 2018-08-10 12:09:48 +08:00
parent 9e46bad91c
commit f41f3da10f

View File

@ -250,11 +250,6 @@ func (n *node) addRoute(path string, handlers HandlersChain) {
func (n *node) insertChild(numParams uint8, path string, fullPath string, handlers HandlersChain) {
var offset int // already handled bytes of the path
// add the prefix of the route
if fullPath[0] != '/' {
fullPath = "/" + fullPath
}
// find prefix until first wildcard (beginning with ':' or '*')
for i, max := 0, len(path); numParams > 0; i++ {
c := path[i]