From 4e8a910b9d78d3c1b5f011e9e59efb4c5f2b765e Mon Sep 17 00:00:00 2001 From: Waldemar Biller Date: Tue, 3 Jul 2018 11:55:47 +0200 Subject: [PATCH] Lookup parts in strings using regexp.MatchString (#1452) Signed-off-by: Waldemar Biller --- template/template.go | 1 + 1 file changed, 1 insertion(+) diff --git a/template/template.go b/template/template.go index cb54b8cb..e37a7a5c 100644 --- a/template/template.go +++ b/template/template.go @@ -128,6 +128,7 @@ var DefaultFuncs = FuncMap{ "join": func(sep string, s []string) string { return strings.Join(s, sep) }, + "match": regexp.MatchString, "safeHtml": func(text string) tmplhtml.HTML { return tmplhtml.HTML(text) },