MCPcopy Create free account
hub / github.com/imgproxy/imgproxy / ChildNodes

Method ChildNodes

xmlparser/node.go:27–39  ·  view source on GitHub ↗

ChildNodes returns an iterator over children of type *Node.

()

Source from the content-addressed store, hash-verified

25
26// ChildNodes returns an iterator over children of type *Node.
27func (n *Node) ChildNodes() iter.Seq[*Node] {
28 return func(yield func(*Node) bool) {
29 for _, child := range n.Children {
30 cn, ok := child.(*Node)
31 if !ok {
32 continue
33 }
34 if !yield(cn) {
35 return
36 }
37 }
38 }
39}
40
41// FilterChildNodes removes all child nodes of type *Node
42// that do not satisfy the given predicate function.

Callers

nothing calls this directly

Calls

no outgoing calls

Tested by

no test coverage detected