]> Cypherpunks repositories - gostls13.git/commit
exp/template: allow declaration of variables only inside control structures.
authorRob Pike <r@golang.org>
Sun, 17 Jul 2011 02:32:00 +0000 (12:32 +1000)
committerRob Pike <r@golang.org>
Sun, 17 Jul 2011 02:32:00 +0000 (12:32 +1000)
commit331840f50935cb886254ee6b5bc6daad7788979b
treec1d4f46068ca742a14ff58e4414d106cd85379b9
parente07c6e6ee78c20b78981591ebc2d0b6cb4094b21
exp/template: allow declaration of variables only inside control structures.
In simple pipelines the declaration has no scope.
Also document the scope.

R=golang-dev, dsymonds
CC=golang-dev
https://golang.org/cl/4761044
src/pkg/exp/template/doc.go
src/pkg/exp/template/parse.go
src/pkg/exp/template/parse_test.go