]> Cypherpunks repositories - gostls13.git/commit
text/template: fix bug in map indexing
authorRob Pike <r@golang.org>
Mon, 23 Jul 2012 23:19:12 +0000 (16:19 -0700)
committerRob Pike <r@golang.org>
Mon, 23 Jul 2012 23:19:12 +0000 (16:19 -0700)
commitce274339a1ed46356f5322288f4ef878a06f0aab
tree8591d294c061ddc3ac632bbd72f13ade404f64c4
parent7b73251d3d1153485b7f78d53ce7cb86b1b4d762
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