From be14524c3384c88f0a5b0d64c4584abcc6ae0665 Mon Sep 17 00:00:00 2001 From: Simon Ser Date: Tue, 3 Dec 2019 13:07:25 +0100 Subject: Display & download any message part --- template.go | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) (limited to 'template.go') 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 } -- cgit v1.2.3-59-g8ed1b