gruntwork-io / boilerplate

A tool for generating files and folders ("boilerplate") from a set of templates
https://www.gruntwork.io
Mozilla Public License 2.0
160 stars 12 forks source link

Arithmetic #13

Closed brikis98 closed 7 years ago

brikis98 commented 7 years ago

This PR adds some basic arithmetic and loop helpers to boilerplate. This will make it a bit easier to perform basic math, loops, etc.

I’ve also updated the existing math helpers to take any type of value and try to convert it to an int, rather than explicitly requiring an int or float64 or a specific type. When working inside a template, you often have a mix of strings, ints, floats, etc and having to do specific type conversions is not usually an option.

brikis98 commented 7 years ago

@josh-padnick Merging so I can do a flurry of boilerplate improvements. Feedback welcome :)

josh-padnick commented 7 years ago

Minor comments only. Cool feature, and looks good!