Skip to content

Commit fdb6034

Browse files
committed
docs: update ForEach doc string
Signed-off-by: Pavel Larkin <laxkin@gmail.com>
1 parent 2415173 commit fdb6034

File tree

1 file changed

+3
-1
lines changed

1 file changed

+3
-1
lines changed

api.go

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -100,7 +100,9 @@ type Tree interface {
100100
// ForEach iterates over all the nodes in the tree, invoking a provided callback function for each node.
101101
// By default, it processes leaf nodes in ascending order.
102102
// The iteration can be customized using options:
103-
// - Pass TraverseReverse to iterate over nodes in descending order.
103+
// - 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.
104106
// The iteration stops if the callback function returns false, allowing for early termination.
105107
ForEach(callback Callback, options ...int)
106108

0 commit comments

Comments
 (0)