From 7d5dd3cb2bdb5237ac43214d27e6fa2bc95f9375 Mon Sep 17 00:00:00 2001 From: ilyam8 Date: Wed, 2 Oct 2024 11:39:54 +0300 Subject: [PATCH] fix sprig funcmap --- pkg/funcmap/funcmap.go | 8 +++++--- 1 file changed, 5 insertions(+), 3 deletions(-) diff --git a/pkg/funcmap/funcmap.go b/pkg/funcmap/funcmap.go index 9556619..1d46086 100644 --- a/pkg/funcmap/funcmap.go +++ b/pkg/funcmap/funcmap.go @@ -10,14 +10,16 @@ import ( ) var FuncMap = func() template.FuncMap { - fm := sprig.HermeticTxtFuncMap() - for name, fn := range funcMap { + fm := sprig.TxtFuncMap() + + for name, fn := range extraFuncMap { fm[name] = fn } + return fm }() -var funcMap = map[string]interface{}{ +var extraFuncMap = map[string]interface{}{ "glob": globAny, "re": regexpAny, }