MCPcopy
hub / github.com/gin-gonic/gin / updateRouteTree

Function updateRouteTree

gin.go:504–514  ·  view source on GitHub ↗

updateRouteTree do update to the route tree recursively

(n *node)

Source from the content-addressed store, hash-verified

502
503// updateRouteTree do update to the route tree recursively
504func 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
517func (engine *Engine) updateRouteTrees() {

Callers 1

updateRouteTreesMethod · 0.85

Calls

no outgoing calls

Tested by

no test coverage detected