Commit 119ef1b8
119ef1b87b23Merged
Svyatoslav Dumchenko <[email protected]> ยท 4 years ago ยท 1 file ยท ~1 modified
Description
Update ValuesReference UnmarshalYAML
Details
- Commit
- 119ef1b87b23
- Parent
- 31a30dc2b112
pkg/release/values.gomodifiedView file
@@ -10,6 +10,7 @@
1010
"github.com/helmwave/helmwave/pkg/release/uniqname"1111
"github.com/helmwave/helmwave/pkg/template"1212
log "github.com/sirupsen/logrus"13+
"gopkg.in/yaml.v3"1314
)1415
1516
// ErrSkipValues is returned when values cannot be used and are skipped.@@ -21,11 +22,11 @@
2122
dst string2223
}2324
24-
// UnmarshalYAML is used to implement Unmarshaler interface of gopkg.in/yaml.v2.25-
func (v *ValuesReference) UnmarshalYAML(unmarshal func(interface{}) error) error {25+
// UnmarshalYAML is used to implement Unmarshaler interface of gopkg.in/yaml.v3.26+
func (v *ValuesReference) UnmarshalYAML(node *yaml.Node) error {2627
m := make(map[string]string)27-
if err := unmarshal(&m); err != nil {28-
return unmarshal(&v.Src)28+
if err := node.Decode(&m); err != nil {29+
return node.Decode(&v.Src)2930
}3031
3132
v.Src = m["src"]@@ -34,7 +35,7 @@
3435
return nil3536
}3637
37-
// MarshalYAML is used to implement Marshaler interface of gopkg.in/yaml.v2.38+
// MarshalYAML is used to implement Marshaler interface of gopkg.in/yaml.v3.3839
func (v ValuesReference) MarshalYAML() (interface{}, error) {3940
return struct {4041
Src string