v4.0.0
Changes in this long awaited release:
Library
- First semver version with Go modules compatibility
- Several bug fixes
- Improved error handling
- Several refactorings to speed up execution and reduce allocations, including support for
io.Writer
inExecute()
functions and short-circuit evaluations in expressions - Add
TemplateSet.FromBytes
- Add
RenderTemplateBytes
- Add
Template.ExecuteWriterUnbuffered
- Add
TemplateLoader
interface and according functions for virtual filesystem support (incl. support for multiple loaders) - Add
pongo2.SetAutoescape
for a global behavior change - Add whitespace control for tags and blocks, supporting
{%-
and-%}
for tags andpongo2.Options
for blocks - Add
pongo2.CleanCache
to remove files from the template cache - Add support for template functions that return an error as the second return value
- Add
Template.ExecuteBlocks
to render supplied list of blocks only
See v3.0...v4.0.0 for a full list of changes.
Thanks to all contributors!
Template Language
- Add support for single quotes in variables, functions and tags
- Add support for
if_exists
-flag ininclude
-tag - Add support for
sorted
-flag infor
-tag with support for maps and arrays/slices - Add
block.Super
support - Add
split
filter