hugo/tpl
Bjørn Erik Pedersen f5ed04bd4a
tpl/partials: Fix cache locking
To make sure a cached partial is ony executed  exactly once.

Performance same:

```bash
name                         old time/op    new time/op    delta
TemplateParamsKeysToLower-4    17.2µs ± 0%    16.5µs ± 0%   ~     (p=1.000 n=1+1)
Partial-4                      18.6µs ± 0%    19.4µs ± 0%   ~     (p=1.000 n=1+1)
PartialCached-4                64.2ns ± 0%    63.7ns ± 0%   ~     (p=1.000 n=1+1)

name                         old alloc/op   new alloc/op   delta
TemplateParamsKeysToLower-4    2.66kB ± 0%    2.66kB ± 0%   ~     (all equal)
Partial-4                      1.31kB ± 0%    1.31kB ± 0%   ~     (all equal)
PartialCached-4                 0.00B          0.00B        ~     (all equal)

name                         old allocs/op  new allocs/op  delta
TemplateParamsKeysToLower-4      92.0 ± 0%      92.0 ± 0%   ~     (all equal)
Partial-4                        41.0 ± 0%      41.0 ± 0%   ~     (all equal)
```
2017-11-16 01:23:37 +01:00
..
cast tpl: Add float template function 2017-09-28 16:53:18 +02:00
collections Clean up lint in various packages 2017-09-29 16:23:16 +02:00
compare tpl/compare: Add cond (ternary) template func 2017-09-08 16:59:43 +02:00
crypto all: Update import paths to gohugoio/hugo 2017-06-13 18:42:45 +02:00
data Use Chroma as new default syntax highlighter 2017-09-25 08:59:02 +02:00
encoding all: Update import paths to gohugoio/hugo 2017-06-13 18:42:45 +02:00
fmt tpl: Add errorf template function 2017-10-03 07:59:51 +02:00
images Clean up lint in various packages 2017-09-29 16:23:16 +02:00
inflect Switch from fork bep/inflect to markbates/inflect 2017-08-01 13:05:09 +02:00
internal all: Fix spelling 2017-08-07 20:19:24 +02:00
lang Run gofmt to get imports in line vs gohugoio/hugo 2017-06-13 19:12:10 +02:00
math tpl/math: Refactor Mod with cast 2017-10-30 21:55:36 +01:00
os tpl: Add os.fileExists template function 2017-09-28 19:52:34 +02:00
partials tpl/partials: Fix cache locking 2017-11-16 01:23:37 +01:00
safe Run gofmt to get imports in line vs gohugoio/hugo 2017-06-13 19:12:10 +02:00
strings tpl: Cleanup strings.TrimPrefix and TrimSuffix 2017-08-18 14:21:58 +02:00
time tpl/time: Add time.Duration and time.ParseDuration template funcs 2017-09-09 09:43:00 +02:00
tplimpl tplimpl: Make partial benchmarks use RunParallel 2017-11-16 01:13:07 +01:00
transform Use Chroma as new default syntax highlighter 2017-09-25 08:59:02 +02:00
urls tpl: Add urls.Parse function 2017-09-24 10:07:35 +02:00
template.go metrics: Add simple template metrics feature 2017-09-26 20:03:04 +02:00