diff --git a/pkg/engine/funcs.go b/pkg/engine/funcs.go index 65956d8aa..7b58e0dc0 100644 --- a/pkg/engine/funcs.go +++ b/pkg/engine/funcs.go @@ -165,9 +165,9 @@ func toTOML(v any) string { // mustToTOML takes an interface, marshals it to toml, and returns a string. // It will panic if there is an error. // -// This is designed to be called from a template when need to ensure that the -// output TOML is valid. -func mustToTOML(v interface{}) string { +// This is designed to be called from a template when you need to ensure that +// the output TOML is valid. +func mustToTOML(v any) string { b := bytes.NewBuffer(nil) e := toml.NewEncoder(b) if err := e.Encode(v); err != nil { diff --git a/pkg/engine/funcs_test.go b/pkg/engine/funcs_test.go index 71adca095..1fe290869 100644 --- a/pkg/engine/funcs_test.go +++ b/pkg/engine/funcs_test.go @@ -135,7 +135,7 @@ keyInElement1 = "valueInElement1"`, assert.Equal(t, tt.expect, b.String(), tt.tpl) } - nonSerializable := map[string]interface{}{ + nonSerializable := map[string]any{ "foo": struct{ Fn func() }{}, }