]> Cypherpunks repositories - gostls13.git/commit
text/template: avoid allocating a new common in copy
authortnclong <long.asyn@gmail.com>
Tue, 18 Jun 2019 14:07:30 +0000 (22:07 +0800)
committerDaniel Martí <mvdan@mvdan.cc>
Tue, 27 Aug 2019 16:56:26 +0000 (16:56 +0000)
commit4a4f752c3812d18ffcaa06624de1a29d4e9ab056
tree0ae8bbeb84043e82f048e551fc70e2118164d4da
parent32b9e568d8c28e63a8f1d93e69b57794350de159
text/template: avoid allocating a new common in copy

Template.New calls t.init, which allocates several items that
are immediately rewritten by copy, so avoid the call to New

Change-Id: I16c7cb001bbcd14cf547c1a2db2734a2f8214e7e
Reviewed-on: https://go-review.googlesource.com/c/go/+/182757
Run-TryBot: Daniel Martí <mvdan@mvdan.cc>
TryBot-Result: Gobot Gobot <gobot@golang.org>
Reviewed-by: Daniel Martí <mvdan@mvdan.cc>
src/text/template/template.go