Fix sort tpl func to return explicit type value
authorTatsushi Demachi <tdemachi@gmail.com>
Thu, 6 Aug 2015 17:27:15 +0000 (02:27 +0900)
committerBjørn Erik Pedersen <bjorn.erik.pedersen@gmail.com>
Fri, 7 Aug 2015 12:06:06 +0000 (14:06 +0200)
commit56534beaf684f374327b6d01be26d15ae41c8985
treed1b95787412f2bd5d5286079021a8c0c7c92e068
parentc7aa881d902811ced207458b04f388e6fb1b5190
Fix sort tpl func to return explicit type value

sort template function returns `[]interface{}` type slice value
regardless of its original element type.

This fixes it to keep the original element type. For example, if it
sorts `map[string]int` type value, it returns `[]int` slice value
instead of `[]interface{}` slice value.
tpl/template_funcs.go
tpl/template_funcs_test.go