From 71a1c76e523da89c1a5ebe556fa4b9263511eb0f Mon Sep 17 00:00:00 2001 From: Brian Brazil Date: Sat, 28 Nov 2015 10:16:13 +0000 Subject: [PATCH] Use title rather than toTitle. It turns out that 'title case' is a thing in unicode, in the same way upper/lower case is. What our users will want is the first character of a word being titlecased, which `title` will do. --- template/template.go | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/template/template.go b/template/template.go index b921a09d..a66dde66 100644 --- a/template/template.go +++ b/template/template.go @@ -93,7 +93,7 @@ type FuncMap map[string]interface{} var DefaultFuncs = FuncMap{ "toUpper": strings.ToUpper, "toLower": strings.ToLower, - "toTitle": strings.ToTitle, + "title": strings.Title, // sortedPairs allows for in-order iteration of key/value pairs. "sortedPairs": func(m map[string]string) []Pair { var (