MCPcopy Create free account
hub / github.com/devspace-sh/devspace / find

Function find

pkg/devspace/config/loader/patch/operation.go:127–139  ·  view source on GitHub ↗
(doc *yaml.Node, predicate func(*yaml.Node) bool)

Source from the content-addressed store, hash-verified

125}
126
127func find(doc *yaml.Node, predicate func(*yaml.Node) bool) *yaml.Node {
128 if predicate(doc) {
129 return doc
130 }
131
132 for _, content := range doc.Content {
133 if found := find(content, predicate); found != nil {
134 return found
135 }
136 }
137
138 return nil
139}
140
141func containsChild(child *yaml.Node) func(*yaml.Node) bool {
142 return func(node *yaml.Node) bool {

Callers 1

PerformMethod · 0.85

Calls

no outgoing calls

Tested by

no test coverage detected