summaryrefslogtreecommitdiff
path: root/libgo/go/text
diff options
context:
space:
mode:
authorIan Lance Taylor <ian@gcc.gnu.org>2013-01-29 20:52:43 +0000
committerIan Lance Taylor <ian@gcc.gnu.org>2013-01-29 20:52:43 +0000
commitd6f2922e91928b5191a5c5f1b3a6b320712b5ce3 (patch)
tree4f2fad1f4b778519bdd5941185c7e1d032af055b /libgo/go/text
parent91bfca59095b1cca9d4364996866848eaaf76c26 (diff)
downloadgcc-d6f2922e91928b5191a5c5f1b3a6b320712b5ce3.tar.gz
libgo: Update Go library to master revision 15489/921e53d4863c.
From-SVN: r195560
Diffstat (limited to 'libgo/go/text')
-rw-r--r--libgo/go/text/template/doc.go8
-rw-r--r--libgo/go/text/template/parse/parse.go4
2 files changed, 6 insertions, 6 deletions
diff --git a/libgo/go/text/template/doc.go b/libgo/go/text/template/doc.go
index 807914c24c8..2da339ce835 100644
--- a/libgo/go/text/template/doc.go
+++ b/libgo/go/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.
diff --git a/libgo/go/text/template/parse/parse.go b/libgo/go/text/template/parse/parse.go
index 250cad5f353..c0fb9274a3d 100644
--- a/libgo/go/text/template/parse/parse.go
+++ b/libgo/go/text/template/parse/parse.go
@@ -151,7 +151,7 @@ func (t *Tree) error(err error) {
func (t *Tree) expect(expected itemType, context string) item {
token := t.nextNonSpace()
if token.typ != expected {
- t.errorf("expected %s in %s; got %s", expected, context, token)
+ t.unexpected(token, context)
}
return token
}
@@ -160,7 +160,7 @@ func (t *Tree) expect(expected itemType, context string) item {
func (t *Tree) expectOneOf(expected1, expected2 itemType, context string) item {
token := t.nextNonSpace()
if token.typ != expected1 && token.typ != expected2 {
- t.errorf("expected %s or %s in %s; got %s", expected1, expected2, context, token)
+ t.unexpected(token, context)
}
return token
}