aboutsummaryrefslogtreecommitdiff
path: root/src/pkg/text/template
diff options
context:
space:
mode:
authorKamil Kisiel <kamil@kamilkisiel.net>2013-01-12 11:06:13 +1100
committerAndrew Gerrand <adg@golang.org>2013-01-12 11:06:13 +1100
commitad63c7e50beb5b148fae72e267f87f782769821a (patch)
tree26976d490ca9c5f42bdb31b274bc598e752c43c4 /src/pkg/text/template
parent3073a02b19464f189cfd7f66ac5edf48742616e7 (diff)
downloadgo-ad63c7e50beb5b148fae72e267f87f782769821a.tar.xz
text/template: Document that range can be used on chan types.
Fixes #4640. R=golang-dev, adg CC=golang-dev https://golang.org/cl/7082044
Diffstat (limited to 'src/pkg/text/template')
-rw-r--r--src/pkg/text/template/doc.go8
1 files changed, 4 insertions, 4 deletions
diff --git a/src/pkg/text/template/doc.go b/src/pkg/text/template/doc.go
index 807914c24c..2da339ce83 100644
--- a/src/pkg/text/template/doc.go
+++ b/src/pkg/text/template/doc.go
@@ -63,16 +63,16 @@ data, defined in detail below.
otherwise, T1 is executed. Dot is unaffected.
{{range pipeline}} T1 {{end}}
- The value of the pipeline must be an array, slice, or map. If
- the value of the pipeline has length zero, nothing is output;
+ The value of the pipeline must be an array, slice, map, or channel.
+ If the value of the pipeline has length zero, nothing is output;
otherwise, dot is set to the successive elements of the array,
slice, or map and T1 is executed. If the value is a map and the
keys are of basic type with a defined order ("comparable"), the
elements will be visited in sorted key order.
{{range pipeline}} T1 {{else}} T0 {{end}}
- The value of the pipeline must be an array, slice, or map. If
- the value of the pipeline has length zero, dot is unaffected and
+ The value of the pipeline must be an array, slice, map, or channel.
+ If the value of the pipeline has length zero, dot is unaffected and
T0 is executed; otherwise, dot is set to the successive elements
of the array, slice, or map and T1 is executed.