From 68036e0ad0b3ee08338d276a9a3b674b17308765 Mon Sep 17 00:00:00 2001 From: Stephen Kitt Date: Fri, 19 Sep 2025 16:56:00 +0200 Subject: [PATCH] Avoid no-change lambdas This replaces functions that wrap another function with no change with a direct reference to the wrapped function. Signed-off-by: Stephen Kitt Kubernetes-commit: 1e2817d5890ac5056e770cbdebdadfb7fc6ef54c --- pkg/explain/v2/funcs.go | 4 +--- 1 file changed, 1 insertion(+), 3 deletions(-) diff --git a/pkg/explain/v2/funcs.go b/pkg/explain/v2/funcs.go index 4c5e1c62b..8fca9cbf3 100644 --- a/pkg/explain/v2/funcs.go +++ b/pkg/explain/v2/funcs.go @@ -64,9 +64,7 @@ func WithBuiltinTemplateFuncs(tmpl *template.Template) *template.Template { } return buf.String(), nil }, - "split": func(s string, sep string) []string { - return strings.Split(s, sep) - }, + "split": strings.Split, "join": func(sep string, strs ...string) string { return strings.Join(strs, sep) },