String implements the [fmt.Stringer] interface by returning the path of the node.
()
| 101 | |
| 102 | // String implements the [fmt.Stringer] interface by returning the path of the node. |
| 103 | func (n *NodeBase) String() string { |
| 104 | if n == nil || n.This == nil { |
| 105 | return "nil" |
| 106 | } |
| 107 | return elide.Middle(n.Path(), 38) |
| 108 | } |
| 109 | |
| 110 | // AsTree returns the [NodeBase] for this Node. |
| 111 | func (n *NodeBase) AsTree() *NodeBase { |