(path *patch.OpPath, doc *yaml.Node)
| 286 | } |
| 287 | |
| 288 | func 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 | |
| 306 | type PatchMetaFromStruct struct { |
| 307 | strategicpatch.PatchMetaFromStruct |
no outgoing calls
no test coverage detected