|
|
@@ -103,6 +103,7 @@ func (n *Node[T]) RemoveSelf(cleanParent bool) { |
|
|
|
|
|
|
|
|
// 修改时需要注意允许在visitorFn中删除当前节点 |
|
|
// 修改时需要注意允许在visitorFn中删除当前节点 |
|
|
func (n *Node[T]) Iterate(visitorFn func(path []string, node *Node[T], isWordNode bool) VisitCtrl) { |
|
|
func (n *Node[T]) Iterate(visitorFn func(path []string, node *Node[T], isWordNode bool) VisitCtrl) { |
|
|
|
|
|
visitorFn([]string{}, n, true) |
|
|
n.iterate([]string{}, visitorFn) |
|
|
n.iterate([]string{}, visitorFn) |
|
|
} |
|
|
} |
|
|
|
|
|
|
|
|
|