]> Cypherpunks repositories - gostls13.git/commit
text/template: catch unexported fields during parse
authorRob Pike <r@golang.org>
Thu, 12 Apr 2012 05:57:09 +0000 (15:57 +1000)
committerRob Pike <r@golang.org>
Thu, 12 Apr 2012 05:57:09 +0000 (15:57 +1000)
commit2d0d3d8f9efadcad71537b046e31f45a4b0a7844
tree3208060580605171c62eb48f5d6ac10a02a9afef
parente6c5e2a36358465ab5038d8af9e70f3b98d5ba88
text/template: catch unexported fields during parse
It's a common error to reference unexported field names in templates,
especially for newcomers. This catches the error at parse time rather than
execute time so the rare few who check errors will notice right away.

These were always an error, so the net behavior is unchanged.
Should break no existing code, just identify the error earlier.

R=golang-dev, dsymonds
CC=golang-dev
https://golang.org/cl/6009048
src/pkg/text/template/parse/lex.go
src/pkg/text/template/parse/parse.go
src/pkg/text/template/parse/parse_test.go