Add template helper functions

This commit is contained in:
Christian Muehlhaeuser
2019-12-07 10:02:00 +01:00
parent a44f992f54
commit a0cc8eba36
2 changed files with 84 additions and 1 deletions
+1 -1
View File
@@ -71,7 +71,7 @@ func formatToken(format string, token string) (string, error) {
v := make(map[string]interface{})
v["text"] = token
tmpl, err := template.New(format).Parse(format)
tmpl, err := template.New(format).Funcs(TemplateFuncMap).Parse(format)
if err != nil {
return "", err
}