Add int and string cast template funcs

This commit is contained in:
Bjørn Erik Pedersen 2016-01-15 23:56:45 +01:00
parent f89eb349e4
commit 75ba84acbf

View file

@ -1507,6 +1507,8 @@ func init() {
"relref": RelRef,
"apply": Apply,
"chomp": Chomp,
"int": func(v interface{}) int { return cast.ToInt(v) },
"string": func(v interface{}) string { return cast.ToString(v) },
"replace": Replace,
"trim": Trim,
"dateFormat": DateFormat,