use interfaces instead of strings
This commit is contained in:
parent
add7ae7237
commit
da88fbcbd7
@ -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]
|
||||||
},
|
},
|
||||||
}
|
}
|
||||||
|
Loading…
Reference in New Issue
Block a user