]> Cypherpunks repositories - gostls13.git/commit
text/template,html/template: state that Funcs must happen before parsing
authorRob Pike <r@golang.org>
Tue, 21 Mar 2017 03:18:02 +0000 (20:18 -0700)
committerRob Pike <r@golang.org>
Tue, 21 Mar 2017 04:07:35 +0000 (04:07 +0000)
commit5c5a10690e56bf127832b98d73c83720e0093eef
tree54c37e6701457fe38ad80686d5da12929fb4ef4b
parent0dafb7d9624c4c2bc876f03f2a6fa8d4a2ce6963
text/template,html/template: state that Funcs must happen before parsing

Any method that affects the parse must happen before parsing.
This obvious point is clear, but it's not clear to some that the
set of defined functions affect the parse.

Fixes #18971

Change-Id: I8b7f8c8cf85b028c18e5ca3b9797de92ea910669
Reviewed-on: https://go-review.googlesource.com/38413
Reviewed-by: Ian Lance Taylor <iant@golang.org>
src/html/template/template.go
src/text/template/template.go