Add accepts a *Node and adds it to the QueryResult, provided it has a valid CaptureName
(n *Node)
| 396 | // Add accepts a *Node and adds it to the QueryResult, |
| 397 | // provided it has a valid CaptureName |
| 398 | func (qr QueryResult) Add(n *Node) { |
| 399 | key := n.CaptureName() |
| 400 | if key == "" { |
| 401 | return |
| 402 | } |
| 403 | qr[key] = n |
| 404 | } |
| 405 | |
| 406 | // Has returns true if the QueryResult contains a *Node |
| 407 | // for the provided capture name |
no test coverage detected