diff --git a/pkg/template/template.go b/pkg/template/template.go index 4da4d7e..f66a54d 100644 --- a/pkg/template/template.go +++ b/pkg/template/template.go @@ -38,10 +38,14 @@ var funcs = template.FuncMap{ "join": func(sep string, s []string) string { return strings.Join(s, sep) }, + "match": regexp.MatchString, "reReplaceAll": func(pattern, repl, text string) string { re := regexp.MustCompile(pattern) return re.ReplaceAllString(text, repl) }, + "stringSlice": func(s ...string) []string { + return s + }, } // LoadTemplate reads and parses all templates defined in the given file and constructs a jiralert.Template.