From da88fbcbd7f7764d9a0a1ea8069dae85a7a60d3e Mon Sep 17 00:00:00 2001 From: Mathieu Acthernoene Date: Thu, 15 Dec 2016 13:31:16 +0100 Subject: [PATCH] use interfaces instead of strings --- helpers.go | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/helpers.go b/helpers.go index 39cf9ad..3492b04 100644 --- a/helpers.go +++ b/helpers.go @@ -21,10 +21,10 @@ var ProtoHelpersFuncMap = template.FuncMap{ a, _ := json.MarshalIndent(v, "", " ") return string(a) }, - "first": func(a []string) string { + "first": func(a []interface{}) interface{} { return a[0] }, - "last": func(a []string) string { + "last": func(a []interface{}) interface{} { return a[len(a)-1] }, }