Documentation ¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
View Source
var SkipNode = errors.New("skip this node")
SkipNode is used as a return value from WalkFuncs to indicate that the node named in the call (and all its children) are to be skipped. It only makes sense to return this from the pre-visit function; it's by definition too late after the post-visit function.
Functions ¶
func Walk ¶
Walk recursively descends a tree, calling `preVisit` on each node, then walking children, then calling `postVisit` on the node.
The pre-visit function may add children. The post-visition function may similarly drop references to children (and probably should, to reduce memory use on large trees).
Types ¶
Click to show internal directories.
Click to hide internal directories.