aboutsummaryrefslogtreecommitdiff
path: root/template.go
diff options
context:
space:
mode:
Diffstat (limited to 'template.go')
-rw-r--r--template.go6
1 files changed, 5 insertions, 1 deletions
diff --git a/template.go b/template.go
index c7db0ae..5d0d28b 100644
--- a/template.go
+++ b/template.go
@@ -16,6 +16,10 @@ func (t *tmpl) Render(w io.Writer, name string, data interface{}, c echo.Context
}
func loadTemplates() (*tmpl, error) {
- t, err := template.New("drmdb").ParseGlob("public/*.html")
+ t, err := template.New("drmdb").Funcs(template.FuncMap{
+ "tuple": func(values ...interface{}) []interface{} {
+ return values
+ },
+ }).ParseGlob("public/*.html")
return &tmpl{t}, err
}