]> Cypherpunks repositories - gostls13.git/commitdiff
text/template: fix range example.
authorYves Junqueira <yves.junqueira@gmail.com>
Tue, 7 Aug 2012 03:40:43 +0000 (20:40 -0700)
committerRob Pike <r@golang.org>
Tue, 7 Aug 2012 03:40:43 +0000 (20:40 -0700)
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