We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent 2415173 commit fdb6034Copy full SHA for fdb6034
api.go
@@ -100,7 +100,9 @@ type Tree interface {
100
// ForEach iterates over all the nodes in the tree, invoking a provided callback function for each node.
101
// By default, it processes leaf nodes in ascending order.
102
// The iteration can be customized using options:
103
- // - Pass TraverseReverse to iterate over nodes in descending order.
+ // - Pass TraverseLeaf to iterate only over leaf nodes.
104
+ // - Pass TraverseNode to iterate only over non-leaf nodes.
105
+ // - Pass TraverseAll to iterate over all nodes in the tree.
106
// The iteration stops if the callback function returns false, allowing for early termination.
107
ForEach(callback Callback, options ...int)
108
0 commit comments