use interfaces instead of strings

This commit is contained in:
Mathieu Acthernoene 2016-12-15 13:31:16 +01:00
parent add7ae7237
commit da88fbcbd7

View File

@ -21,10 +21,10 @@ var ProtoHelpersFuncMap = template.FuncMap{
a, _ := json.MarshalIndent(v, "", " ") a, _ := json.MarshalIndent(v, "", " ")
return string(a) return string(a)
}, },
"first": func(a []string) string { "first": func(a []interface{}) interface{} {
return a[0] return a[0]
}, },
"last": func(a []string) string { "last": func(a []interface{}) interface{} {
return a[len(a)-1] return a[len(a)-1]
}, },
} }