addChild will add a child node, keeping wildcardChild at the end
(child *node)
| 69 | |
| 70 | // addChild will add a child node, keeping wildcardChild at the end |
| 71 | func (n *node) addChild(child *node) { |
| 72 | if n.wildChild && len(n.children) > 0 { |
| 73 | wildcardChild := n.children[len(n.children)-1] |
| 74 | n.children = append(n.children[:len(n.children)-1], child, wildcardChild) |
| 75 | } else { |
| 76 | n.children = append(n.children, child) |
| 77 | } |
| 78 | } |
| 79 | |
| 80 | func countParams(path string) uint16 { |
| 81 | colons := strings.Count(path, ":") |
no outgoing calls
no test coverage detected