componentNodePath implements the CHASM Context interface
( component Component, )
| 1567 | |
| 1568 | // componentNodePath implements the CHASM Context interface |
| 1569 | func (n *Node) componentNodePath( |
| 1570 | component Component, |
| 1571 | ) ([]string, error) { |
| 1572 | // It's unnecessary to deserialize entire tree as calling this method means |
| 1573 | // caller already have the deserialized value. |
| 1574 | |
| 1575 | refNode, ok := n.valueToNode[component] |
| 1576 | if !ok || !refNode.isComponent() { |
| 1577 | return nil, errComponentNotFound |
| 1578 | } |
| 1579 | |
| 1580 | return refNode.path(), nil |
| 1581 | } |
| 1582 | |
| 1583 | // dataNodePath implements the CHASM Context interface |
| 1584 | func (n *Node) dataNodePath( |
no test coverage detected