Removed unnecessary functions from report template (#2040)

This commit is contained in:
Fatih Çelik authored and GitHub committed 2026-02-21 07:30:12 -06:00
1 parent ca20267a84
commit 8d1f98c796
2 files changed
+56 -1

No files matched your search

+7 -1
View File
@@ -29,7 +29,13 @@ func NewTemplateReporter(templatePath string) (*TemplateReporter, error) {
// TODO: Add helper functions like escaping for JSON, XML, etc.
t := template.New("custom")
t = t.Funcs(sprig.TxtFuncMap())
funcMap := sprig.TxtFuncMap()
delete(funcMap, "env")
delete(funcMap, "expandenv")
delete(funcMap, "getHostByName")
t = t.Funcs(funcMap)
t, err = t.Parse(templateText)
if err != nil {
return nil, fmt.Errorf("error parsing file: %w", err)