updateRouteTree do update to the route tree recursively
(n *node)
| 502 | |
| 503 | // updateRouteTree do update to the route tree recursively |
| 504 | func updateRouteTree(n *node) { |
| 505 | n.path = strings.ReplaceAll(n.path, escapedColon, colon) |
| 506 | n.fullPath = strings.ReplaceAll(n.fullPath, escapedColon, colon) |
| 507 | n.indices = strings.ReplaceAll(n.indices, backslash, colon) |
| 508 | if n.children == nil { |
| 509 | return |
| 510 | } |
| 511 | for _, child := range n.children { |
| 512 | updateRouteTree(child) |
| 513 | } |
| 514 | } |
| 515 | |
| 516 | // updateRouteTrees do update to the route trees |
| 517 | func (engine *Engine) updateRouteTrees() { |