|
|
@ -143,13 +143,13 @@ func add(nd *node, route string, item interface{}) error {
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
return ErrInvalidState
|
|
|
|
return ErrInvalidState
|
|
|
|
} else {
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
child := newNode(nil)
|
|
|
|
child := newNode(nil)
|
|
|
|
children[token] = child
|
|
|
|
children[token] = child
|
|
|
|
return add(child, route[i+1:], item)
|
|
|
|
return add(child, route[i+1:], item)
|
|
|
|
}
|
|
|
|
}
|
|
|
|
}
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
children := nd.getChildren(route)
|
|
|
|
children := nd.getChildren(route)
|
|
|
|
if child, ok := children[route]; ok {
|
|
|
|
if child, ok := children[route]; ok {
|
|
|
|