]> Cypherpunks repositories - gostls13.git/commit
text/template: add back pointer to Nodes for better error generation
authorRob Pike <r@golang.org>
Fri, 29 Aug 2014 16:54:00 +0000 (09:54 -0700)
committerRob Pike <r@golang.org>
Fri, 29 Aug 2014 16:54:00 +0000 (09:54 -0700)
commit1ad1c0bf31d878b32d8b093e84fed7bcc369f9cd
treefab78850378ba6c0231c3238e05ec75ee940c4b7
parent9f38b6c9e574c672d646a366c1933c3ff88b8781
text/template: add back pointer to Nodes for better error generation
ErrorContext now has all the information it needs from the Node,
rather than depending on the template that contains it. This makes
it easier for html/template to generate correct locations in its
error messages.

Updated html/template to use this ability where it is easy, which is
not everywhere, but more work can probably push it through.

Fixes #8577.

LGTM=adg
R=golang-codereviews, adg
CC=golang-codereviews
https://golang.org/cl/130620043
src/pkg/html/template/error.go
src/pkg/html/template/escape.go
src/pkg/html/template/escape_test.go
src/pkg/html/template/template.go
src/pkg/html/template/transition.go
src/pkg/text/template/parse/node.go
src/pkg/text/template/parse/parse.go
src/pkg/text/template/parse/parse_test.go