There is no way to remove the route?
func (engine *Engine) RemoveRoute(path string) bool {
for _, tree := range engine.trees {
find("", path, tree.root, tree.root)
}
return true
}
func find(path, targetRoute string, root *node, org *node) {
path += root.path
if len(root.handlers) > 0 && strings.EqualFold(path, targetRoute) {
//娓呯悊 handlers chain
var hd HandlersChain
root.handlers = hd
return
}
for _, child := range root.children {
find(path, targetRoute, child, root)
}
}
@monikaYZ I thank U delete uro route in net.http.Server handler struct.
We can't understand your problem this way
please post more details and closing, if you still problem please reopen and discuss. thanks! duplicated #776
I also need a dynamic route. Please support deleting or canceling routing!
Most helpful comment
We can't understand your problem this way