diff options
Diffstat (limited to 'modules')
-rw-r--r-- | modules/templates/helper.go | 8 |
1 files changed, 8 insertions, 0 deletions
diff --git a/modules/templates/helper.go b/modules/templates/helper.go index deaa9526be..c3c92f856b 100644 --- a/modules/templates/helper.go +++ b/modules/templates/helper.go @@ -269,6 +269,14 @@ func NewFuncMap() []template.FuncMap { return "" } }, + "contain": func(s []int64, id int64) bool { + for i := 0; i < len(s); i++ { + if s[i] == id { + return true + } + } + return false + }, }} } |