Jet template engine
This release
As a result, it's now possible to execute templates with guaranteed zero memory allocations (during execution) by using a combination of int and custom rangers and either simple field access or custom renderers.
Thank you, @matheusd for submitting these PRs!
Full Changelog: https://github.com/CloudyKit/jet/compare/v6.1.0...v6.1.1
Added dump()
built-in function for development/debugging: https://github.com/CloudyKit/jet/blob/master/docs/builtins.md#dump
Thanks @jan-herout for contributing this! (#189)
Non-breaking workaround for #187: comments were not parsed correctly when using custom delimiters.
The in-memory template loader introduced in v6.0.0 is now safe for concurrent use. (3f2f52abb7e0d2f6900bf1b7520074b98b4d8e33)
Version 6 brings Go API improvements, mainly from #182 and #183. Take a look at the breaking changes documentation for a detailed overview. There are no changes to the template language.
Bugfix release: Concurrent use of a Set of templates could cause data races via a shared array for the argument values of function calls using the reflect package. https://github.com/CloudyKit/jet/commit/0e59615c7a6c1e1046ef26e020eedb01f7fa651f is the only commit since v5.0.2.
This is just v3.0.0 plus https://github.com/CloudyKit/jet/pull/176. Thanks @tooolbox for the backport!
Bugfix release: When calling variadic functions, the list of argument expressions was not correctly mapped to the variadic argument slice needed to call the function using reflection. See #171 for more information. Thanks, @alresvor!
Bugfix release: When using discard syntax in a simple "let" assignment, i.e. one where the right side does not return an optional second value like a map lookup for example, the right side wasn't evaluated. For example, these all worked as expected and the right side was evaluated:
_ := myMap["foo"]
_ = myMap["foo"]
_, ok := myMap["foo"]
_, ok = myMap["foo"]
_ = foo()
But this did not actually execute foo()
:
_ := foo()
f67efbcea6a7fdd47b716daebca8f9947e86422d fixes this case and is the only commit in v5.0.1 that isn't in v5.0.0.