Documentation ¶
Overview ¶
Package ytwalk implements cypress traversal.
Index ¶
Constants ¶
This section is empty.
Variables ¶
View Source
var ErrSkipSubtree = errors.New("skip subtree")
ErrSkipSubtree is sentinel value returned from OnNode.
Functions ¶
Types ¶
type Walk ¶
type Walk struct { // Root is cypress path where walk starts. Root ypath.Path // Attributes are requested for each node. Attributes []string // Node is optional pointer to type that will hold deserialized cypress node. Node interface{} // OnNode is invoked for each node during traversal. OnNode func(path ypath.Path, node interface{}) error // RespectOpaque defines whether we stop at opaque nodes (true) or not (false). RespectOpaque bool }
Click to show internal directories.
Click to hide internal directories.