mirror of
https://github.com/helm/helm.git
synced 2026-08-13 17:07:28 +00:00
ref(pkg/chartutil): Capitalize YAML
Capitalize "yaml" in error message. Remove empty var from test error message.
This commit is contained in:
@@ -391,7 +391,7 @@ func istable(v interface{}) bool {
|
||||
// PathValue takes a yaml path with . notation and returns the value if exists
|
||||
func (v Values) PathValue(ypath string) (interface{}, error) {
|
||||
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")
|
||||
}
|
||||
yps := strings.Split(ypath, ".")
|
||||
if len(yps) == 1 {
|
||||
|
||||
@@ -447,8 +447,8 @@ chapter:
|
||||
if _, err := d.PathValue("chapter.doesntexist.one"); err == nil {
|
||||
t.Errorf("Non-existent key in middle of path should return error: %s\n%v", err, d)
|
||||
}
|
||||
if _, err := d.PathValue(""); err == nil {
|
||||
t.Errorf("Empty path should return error: %s\n%v", err, d)
|
||||
if _, err := d.PathValue(""); err != nil {
|
||||
t.Errorf("Empty path should return error: \n%v", d)
|
||||
}
|
||||
if v, err := d.PathValue("title"); err == nil {
|
||||
if v != "Moby Dick" {
|
||||
|
||||
Reference in New Issue
Block a user