diff options
author | Simon Ser <contact@emersion.fr> | 2019-12-03 13:07:25 +0100 |
---|---|---|
committer | Simon Ser <contact@emersion.fr> | 2019-12-03 13:07:25 +0100 |
commit | be14524c3384c88f0a5b0d64c4584abcc6ae0665 (patch) | |
tree | 157663357ab0c55b98d53e7feb8be0f7849f1ff1 /template.go | |
parent | 33b8679f1c6b2055196536b3e3ae808195202377 (diff) | |
download | alps-be14524c3384c88f0a5b0d64c4584abcc6ae0665.tar.gz alps-be14524c3384c88f0a5b0d64c4584abcc6ae0665.zip |
Display & download any message part
Diffstat (limited to 'template.go')
-rw-r--r-- | template.go | 6 |
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 } |