]> Cypherpunks repositories - gostls13.git/commit
html/template: fix multiple Clones of redefined template
authorCaleb Spare <cespare@gmail.com>
Mon, 14 Nov 2016 02:06:16 +0000 (18:06 -0800)
committerRob Pike <r@golang.org>
Tue, 15 Nov 2016 04:30:20 +0000 (04:30 +0000)
commit1e917312511f6ce54bbdcea8cd0c25e66973d49e
tree8d0ba1cb74b27e8a917e9af2037f6cfe1ea27c26
parent91461002f354a5fc8b3898bbb0ade90d2921441e
html/template: fix multiple Clones of redefined template

This change redoes the fix for #16101 (CL 31092) in a different way by
making t.Clone return the template associated with the t.Name() while
allowing for the case that a template of the same name is define-d.

Fixes #17735.

Change-Id: I1e69672390a4c81aa611046a209008ae4a3bb723
Reviewed-on: https://go-review.googlesource.com/33210
Run-TryBot: Caleb Spare <cespare@gmail.com>
TryBot-Result: Gobot Gobot <gobot@golang.org>
Reviewed-by: Rob Pike <r@golang.org>
src/html/template/clone_test.go
src/html/template/template.go