Update documentation for kyaml package

This commit is contained in:
Phillip Wittrock
2019-11-07 09:16:27 -08:00
parent 018698ec85
commit 2e33a69388
12 changed files with 226 additions and 53 deletions

View File

@@ -303,10 +303,13 @@ func (f FieldMatcher) Filter(rn *RNode) (*RNode, error) {
return nil, nil
}
// Lookup returns a PathGetter to lookup a field by its path.
func Lookup(path ...string) PathGetter {
return PathGetter{Path: path}
}
// Lookup returns a PathGetter to lookup a field by its path and create it if it doesn't already
// exist.
func LookupCreate(kind yaml.Kind, path ...string) PathGetter {
return PathGetter{Path: path, Create: kind}
}