Method
getEdge
(ntyp nodeTyp, label, tail byte, prefix string)
Source from the content-addressed store, hash-verified
| 329 | } |
| 330 | |
| 331 | func (n *node) getEdge(ntyp nodeTyp, label, tail byte, prefix string) *node { |
| 332 | nds := n.children[ntyp] |
| 333 | for i := range nds { |
| 334 | if nds[i].label == label && nds[i].tail == tail { |
| 335 | if ntyp == ntRegexp && nds[i].prefix != prefix { |
| 336 | continue |
| 337 | } |
| 338 | return nds[i] |
| 339 | } |
| 340 | } |
| 341 | return nil |
| 342 | } |
| 343 | |
| 344 | func (n *node) setEndpoint(method methodTyp, handler http.Handler, pattern string) { |
| 345 | // Set the handler for the method type on the node |
Tested by
no test coverage detected