From d6f2922e91928b5191a5c5f1b3a6b320712b5ce3 Mon Sep 17 00:00:00 2001 From: Ian Lance Taylor Date: Tue, 29 Jan 2013 20:52:43 +0000 Subject: libgo: Update Go library to master revision 15489/921e53d4863c. From-SVN: r195560 --- libgo/go/text/template/doc.go | 8 ++++---- libgo/go/text/template/parse/parse.go | 4 ++-- 2 files changed, 6 insertions(+), 6 deletions(-) (limited to 'libgo/go/text') diff --git a/libgo/go/text/template/doc.go b/libgo/go/text/template/doc.go index 807914c..2da339c 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 250cad5..c0fb927 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 } -- cgit v1.1