]> Cypherpunks repositories - gostls13.git/commitdiff
[release-branch.go1] text/template: fix range example.
authorYves Junqueira <yves.junqueira@gmail.com>
Fri, 21 Sep 2012 19:54:31 +0000 (05:54 +1000)
committerRob Pike <r@golang.org>
Fri, 21 Sep 2012 19:54:31 +0000 (05:54 +1000)
««« backport c37d3a28f6b0
text/template: fix range example.

R=r
CC=adg, gobot, golang-dev
https://golang.org/cl/6449096

»»»

src/pkg/text/template/doc.go

index aa50ab97f6f2d47f49490ed74a24383cbb85e788..4a1682d97a347a184ef44ae7cb5e3eabca9d912e 100644 (file)
@@ -198,7 +198,7 @@ If a "range" action initializes a variable, the variable is set to the
 successive elements of the iteration.  Also, a "range" may declare two
 variables, separated by a comma:
 
-       $index, $element := pipeline
+       range $index, $element := pipeline
 
 in which case $index and $element are set to the successive values of the
 array/slice index or map key and element, respectively.  Note that if there is