Skip to content

Commit

Permalink
feat: use text/template.FuncMap
Browse files Browse the repository at this point in the history
Signed-off-by: Bird <aflybird0@gmail.com>
  • Loading branch information
aFlyBird0 committed Nov 30, 2022
1 parent db20e1e commit a8391fd
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion pkg/util/template/render.go
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,7 @@ func Render(name, templateStr string, variable any, funcMaps ...template.FuncMap
t := template.New(name).Option("missingkey=error").Delims("[[", "]]")

// use sprig functions such as "env"
t.Funcs(sprig.FuncMap())
t.Funcs(sprig.TxtFuncMap())
for _, funcMap := range funcMaps {
t.Funcs(funcMap)
}
Expand Down

0 comments on commit a8391fd

Please sign in to comment.