]> Cypherpunks repositories - gostls13.git/commit
[release-branch.go1] text/template: fix bug in map indexing
authorRob Pike <r@golang.org>
Fri, 21 Sep 2012 19:54:11 +0000 (05:54 +1000)
committerRob Pike <r@golang.org>
Fri, 21 Sep 2012 19:54:11 +0000 (05:54 +1000)
commit402d6b1f5fbbe19d462ea38b0c4cbf699dfda5e6
tree1da2cd343752556b1ce5c09de3cb4dde4f12e3b2
parent74282e400c7f52a6e78e09dea7e9f2d1def6fb8b
[release-branch.go1] text/template: fix bug in map indexing

««« backport 0748cd92ed76
text/template: fix bug in map indexing
If the key is not present, return value of the type of the element
not the type of the key. Also fix a test that should have caught this case.

Fixes #3850.

R=golang-dev, dsymonds
CC=golang-dev
https://golang.org/cl/6405078

»»»
src/pkg/text/template/exec_test.go
src/pkg/text/template/funcs.go