MCPcopy Index your code
hub / github.com/devspace-sh/devspace / findPath

Function findPath

pkg/devspace/config/loader/profile.go:288–304  ·  view source on GitHub ↗
(path *patch.OpPath, doc *yaml.Node)

Source from the content-addressed store, hash-verified

286}
287
288func findPath(path *patch.OpPath, doc *yaml.Node) (interface{}, error) {
289 pathFinder, err := yamlpath.NewPath(string(*path))
290 if err != nil {
291 return nil, err
292 }
293
294 matches, err := pathFinder.Find(doc)
295 if err != nil {
296 return nil, err
297 }
298
299 if len(matches) > 0 {
300 return matches[0], nil
301 }
302
303 return nil, nil
304}
305
306type PatchMetaFromStruct struct {
307 strategicpatch.PatchMetaFromStruct

Callers 1

ApplyPatchesOnObjectFunction · 0.85

Calls

no outgoing calls

Tested by

no test coverage detected