1
0
mirror of https://github.com/golang/go synced 2024-11-14 22:20:21 -07:00
go/src/internal/lazyregexp
Daniel Martí bd23e84b73 internal/lazytemplate: add a lazy template wrapper
Similar to internal/lazyregexp, this will allow removing unnecessary
work from init functions with trivial refactors, thanks to sync.Once.

Copy the structure. The only major difference is that a template also
carries a name.

For #29382.

Change-Id: I65d096dc2e2072b310bf59a814cd62669856b5b5
Reviewed-on: https://go-review.googlesource.com/c/164337
Run-TryBot: Daniel Martí <mvdan@mvdan.cc>
TryBot-Result: Gobot Gobot <gobot@golang.org>
Reviewed-by: Brad Fitzpatrick <bradfitz@golang.org>
2019-02-27 23:49:01 +00:00
..
lazyre.go internal/lazytemplate: add a lazy template wrapper 2019-02-27 23:49:01 +00:00