summaryrefslogtreecommitdiffstats
path: root/tpl/math/math_test.go
AgeCommit message (Collapse)Author
2018-07-06Add a newScratch template funcBjørn Erik Pedersen
Fixes #4685
2017-10-30tpl/math: Refactor Mod with castArtem Sidorenko
It makes the code smaller
2017-09-24tpl: Add math.Ceil, Floor, and RoundCameron Moore
Ceil and Floor are frontends for the stdlib math functions. The Round implementation is essentially the same thing except that the Go stdlib doesn't include a Round implementation in a stable release yet. I've included the Round function slated for Go 1.10. Fixes #3883
2017-07-03tpl/math: Add log functionArtem Sidorenko
It might be very useful for building tag clouds.
2017-05-01tpl: Fix the remaining template funcs namespace issuesBjørn Erik Pedersen
See #3042
2017-04-30tpl: Add template function namespacesCameron Moore
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