hugo/tpl
Cameron Moore de7c32a1a8 tpl: Add template function namespaces
This commit moves almost all of the template functions into separate
packages under tpl/ and adds a namespace framework.  All changes should
be backward compatible for end users, as all existing function names in
the template funcMap are left intact.

Seq and DoArithmatic have been moved out of the helpers package and into
template namespaces.

Most of the tests involved have been refactored, and many new tests have
been written.  There's still work to do, but this is a big improvement.

I got a little overzealous and added some new functions along the way:

- strings.Contains
- strings.ContainsAny
- strings.HasSuffix
- strings.TrimPrefix
- strings.TrimSuffix

Documentation is forthcoming.

Fixes #3042
2017-04-30 10:56:38 +02:00
..
collections tpl: Add template function namespaces 2017-04-30 10:56:38 +02:00
compare tpl: Add template function namespaces 2017-04-30 10:56:38 +02:00
crypto tpl: Add template function namespaces 2017-04-30 10:56:38 +02:00
data tpl: Add template function namespaces 2017-04-30 10:56:38 +02:00
encoding tpl: Add template function namespaces 2017-04-30 10:56:38 +02:00
images tpl: Add template function namespaces 2017-04-30 10:56:38 +02:00
inflect tpl: Add template function namespaces 2017-04-30 10:56:38 +02:00
lang tpl: Add template function namespaces 2017-04-30 10:56:38 +02:00
math tpl: Add template function namespaces 2017-04-30 10:56:38 +02:00
os tpl: Add template function namespaces 2017-04-30 10:56:38 +02:00
safe tpl: Add template function namespaces 2017-04-30 10:56:38 +02:00
strings tpl: Add template function namespaces 2017-04-30 10:56:38 +02:00
time tpl: Add template function namespaces 2017-04-30 10:56:38 +02:00
tplimpl tpl: Add template function namespaces 2017-04-30 10:56:38 +02:00
transform tpl: Add template function namespaces 2017-04-30 10:56:38 +02:00
urls tpl: Add template function namespaces 2017-04-30 10:56:38 +02:00
template.go tpl: Fix nil pointer in Tree() 2017-04-05 22:12:03 +02:00