|
|
@ -392,9 +392,9 @@ func istable(v interface{}) bool {
|
|
|
|
// The path starts at the root of the YAML structure and is comprised of YAML keys separated by periods.
|
|
|
|
// The path starts at the root of the YAML structure and is comprised of YAML keys separated by periods.
|
|
|
|
// Given the following YAML data the value at path "chapter.one.title" is "Loomings".
|
|
|
|
// Given the following YAML data the value at path "chapter.one.title" is "Loomings".
|
|
|
|
//
|
|
|
|
//
|
|
|
|
// chapter:
|
|
|
|
// chapter:
|
|
|
|
// one:
|
|
|
|
// one:
|
|
|
|
// title: "Loomings"
|
|
|
|
// title: "Loomings"
|
|
|
|
func (v Values) PathValue(ypath string) (interface{}, error) {
|
|
|
|
func (v Values) PathValue(ypath string) (interface{}, error) {
|
|
|
|
if len(ypath) == 0 {
|
|
|
|
if len(ypath) == 0 {
|
|
|
|
return nil, errors.New("YAML path string cannot be zero length")
|
|
|
|
return nil, errors.New("YAML path string cannot be zero length")
|
|
|
|