diff --git a/magefiles/helm.go b/magefiles/helm.go index 88c69d834..2399e1871 100644 --- a/magefiles/helm.go +++ b/magefiles/helm.go @@ -27,7 +27,6 @@ import ( "github.com/magefile/mage/sh" yamlpath "github.com/vmware-labs/yaml-jsonpath/pkg/yamlpath" "gopkg.in/yaml.v3" - "io/ioutil" "os" "strings" ) @@ -150,10 +149,9 @@ func updateChartValue(key, value string) { var b bytes.Buffer yamlEncoder := yaml.NewEncoder(&b) yamlEncoder.SetIndent(2) - yamlEncoder.Encode(&n) err = yamlEncoder.Encode(&n) CheckIfError(err, "HELM Could not Marshal new Values file") - err = ioutil.WriteFile(HelmChartValues, b.Bytes(), 0644) + err = os.WriteFile(HelmChartValues, b.Bytes(), 0644) CheckIfError(err, "HELM Could not write new Values file to %s", HelmChartValues) Info("HELM Ingress Nginx Helm Chart update %s %s", key, value)