]> Cypherpunks repositories - gostls13.git/commit
text/template: make redefinition of a template in a set more consistent.
authorRob Pike <r@golang.org>
Tue, 8 Nov 2011 22:33:07 +0000 (14:33 -0800)
committerRob Pike <r@golang.org>
Tue, 8 Nov 2011 22:33:07 +0000 (14:33 -0800)
commit3e94e757eff3bfa4150b1e88fda8db98905290de
tree22c2f5d5319d0d0cfbc86b50af074890194349c2
parent0e5cd9d3f6ee8e0828cf29152d7180f70a00d6c7
text/template: make redefinition of a template in a set more consistent.
Also make it agree with the documentation. You get an error, unless you're
calling Add explicitly, in which case it panics since that's almost certainly
a bug. The discrepancy was caused by a panic that wasn't turned into
an error along one path; deleted the offending function for clarity.

R=r, rsc
CC=golang-dev
https://golang.org/cl/5354045
src/pkg/text/template/parse.go
src/pkg/text/template/set.go