]> Cypherpunks repositories - gostls13.git/commit
text/template: detect unexported fields better
authorRob Pike <r@golang.org>
Mon, 23 Apr 2012 05:39:02 +0000 (15:39 +1000)
committerRob Pike <r@golang.org>
Mon, 23 Apr 2012 05:39:02 +0000 (15:39 +1000)
commita8098cbcfd7772911f761e787f656f6e685c105e
tree2bc028cbce7a7aca47d1855b3ab4031bc2cf037e
parent53372903c70e93704cc32dc229d8d83a03bcc457
text/template: detect unexported fields better
Moves the error detection back into execution, where it used to be,
and improves the error message.
Rolls back most of 6009048, which broke lower-case keys in maps.
If it weren't for maps we could detect this at compile time rather than
execution time.

Fixes #3542.

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