Fix type conversion issue with pointers

This commit is contained in:
Manfred Touron 2016-12-01 10:16:30 +01:00
parent bec037ce64
commit 74803d86a3
No known key found for this signature in database
GPG Key ID: 9CCF47DF1FD978A1

View File

@ -23,8 +23,8 @@ var FuncMap = template.FuncMap{
"split": strings.Split, "split": strings.Split,
"join": strings.Join, "join": strings.Join,
"title": strings.Title, "title": strings.Title,
"unexport": func(v interface{}) string { "unexport": func(input string) string {
return fmt.Sprintf("%s%s", strings.ToLower(v.(string)[0:1]), v.(string)[1:]) return fmt.Sprintf("%s%s", strings.ToLower(input[0:1]), input[1:])
}, },
"lower": strings.ToLower, "lower": strings.ToLower,
"upper": strings.ToUpper, "upper": strings.ToUpper,