ValueNode returns the given value node for a key, or nil if not found.
(key string)
| 64 | |
| 65 | // ValueNode returns the given value node for a key, or nil if not found. |
| 66 | func (n *Node) ValueNode(key string) *Node { |
| 67 | if idx := n.KeyIndex(key); idx != -1 { |
| 68 | return &Node{n.Content[idx+1]} |
| 69 | } |
| 70 | |
| 71 | return nil |
| 72 | } |