From ddd1b0a8127cff6a12a7e9ddbed490d5ba511565 Mon Sep 17 00:00:00 2001 From: iFrozenPhoenix <36128722+iFrozenPhoenix@users.noreply.github.com> Date: Sun, 20 Oct 2024 15:06:33 +0000 Subject: [PATCH] fix: fix validation error for go templates that use a crictl defined builtin function --- cmd/crictl/templates.go | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/cmd/crictl/templates.go b/cmd/crictl/templates.go index b8ed4491b9..0631c5236f 100644 --- a/cmd/crictl/templates.go +++ b/cmd/crictl/templates.go @@ -77,6 +77,6 @@ func tmplExecuteRawJSON(tmplStr, rawJSON string) (string, error) { } func validateTemplate(tmplStr string) error { - _, err := template.New("").Parse(tmplStr) + _, err := template.New("").Funcs(builtinTmplFuncs()).Parse(tmplStr) return err }