Merge pull request #3232 from justinsb/hint_about_bytereader

Expand rnode function comments to point to multi-object options.
This commit is contained in:
Donny Xia
2020-11-16 10:12:54 -08:00
committed by GitHub

View File

@@ -50,12 +50,14 @@ func GetValue(node *RNode) string {
return node.YNode().Value
}
// Parse parses a yaml string into an *RNode
// Parse parses a yaml string into an *RNode.
// To parse multiple resources, consider a kio.ByteReader
func Parse(value string) (*RNode, error) {
return Parser{Value: value}.Filter(nil)
}
// ReadFile parses a single Resource from a yaml file
// ReadFile parses a single Resource from a yaml file.
// To parse multiple resources, consider a kio.ByteReader
func ReadFile(path string) (*RNode, error) {
b, err := ioutil.ReadFile(path)
if err != nil {