hugo/tpl
Bjørn Erik Pedersen a55640de8e
tpl: Allow the partial template func to return any type
This commit adds support for return values in partials.

This means that you can now do this and similar:

    {{ $v := add . 42 }}
    {{ return $v }}

Partials without a `return` statement will be rendered as before.

This works for both `partial` and `partialCached`.

Fixes #5783
2019-04-02 10:30:24 +02:00
..
cast
collections all: Apply staticcheck recommendations 2019-03-24 16:14:51 +01:00
compare tpl/tplimpl: Fix template truth logic 2019-03-06 22:52:38 +01:00
crypto
data all: Apply staticcheck recommendations 2019-03-24 16:14:51 +01:00
encoding
fmt
hugo
images
inflect
internal
lang
math all: Apply staticcheck recommendations 2019-03-24 16:14:51 +01:00
os all: Apply staticcheck recommendations 2019-03-24 16:14:51 +01:00
partials tpl: Allow the partial template func to return any type 2019-04-02 10:30:24 +02:00
path
reflect
resources
safe
site
strings
templates
time
tplimpl tpl: Allow the partial template func to return any type 2019-04-02 10:30:24 +02:00
transform all: Apply staticcheck recommendations 2019-03-24 16:14:51 +01:00
urls
template.go all: Apply staticcheck recommendations 2019-03-24 16:14:51 +01:00
template_info.go tpl: Allow the partial template func to return any type 2019-04-02 10:30:24 +02:00
template_test.go