diff options
Diffstat (limited to 'modules/base/template.go')
-rw-r--r-- | modules/base/template.go | 4 |
1 files changed, 4 insertions, 0 deletions
diff --git a/modules/base/template.go b/modules/base/template.go index 23d3d27713..5268da6490 100644 --- a/modules/base/template.go +++ b/modules/base/template.go @@ -8,6 +8,7 @@ import ( "container/list" "fmt" "html/template" + "strings" "time" ) @@ -54,4 +55,7 @@ var TemplateFuncs template.FuncMap = map[string]interface{}{ "ActionDesc": ActionDesc, "DateFormat": DateFormat, "List": List, + "Mail2Domain": func(mail string) string { + return "mail." + strings.Split(mail, "@")[1] + }, } |