diff options
Diffstat (limited to 'tpl/tplimpl/template_funcs.go')
-rw-r--r-- | tpl/tplimpl/template_funcs.go | 7 |
1 files changed, 6 insertions, 1 deletions
diff --git a/tpl/tplimpl/template_funcs.go b/tpl/tplimpl/template_funcs.go index 3daba74a0..d73d4d336 100644 --- a/tpl/tplimpl/template_funcs.go +++ b/tpl/tplimpl/template_funcs.go @@ -251,6 +251,9 @@ func newTemplateExecuter(d *deps.Deps) (texttemplate.Executer, map[string]reflec } func createFuncMap(d *deps.Deps) map[string]any { + if d.TmplFuncMap != nil { + return d.TmplFuncMap + } funcMap := template.FuncMap{} nsMap := make(map[string]any) @@ -292,5 +295,7 @@ func createFuncMap(d *deps.Deps) map[string]any { } } - return funcMap + d.TmplFuncMap = funcMap + + return d.TmplFuncMap } |