diff options
author | Ian Lance Taylor <ian@gcc.gnu.org> | 2011-12-03 02:17:34 +0000 |
---|---|---|
committer | Ian Lance Taylor <ian@gcc.gnu.org> | 2011-12-03 02:17:34 +0000 |
commit | 2fd401c8f190f1fe43e51a7f726f6ed6119a1f96 (patch) | |
tree | 7f76eff391f37fe6467ff4ffbc0c582c9959ea30 /libgo/go/template/set.go | |
parent | 02e9018f1616b23f1276151797216717b3564202 (diff) | |
download | gcc-2fd401c8f190f1fe43e51a7f726f6ed6119a1f96.zip gcc-2fd401c8f190f1fe43e51a7f726f6ed6119a1f96.tar.gz gcc-2fd401c8f190f1fe43e51a7f726f6ed6119a1f96.tar.bz2 |
libgo: Update to weekly.2011-11-02.
From-SVN: r181964
Diffstat (limited to 'libgo/go/template/set.go')
-rw-r--r-- | libgo/go/template/set.go | 7 |
1 files changed, 3 insertions, 4 deletions
diff --git a/libgo/go/template/set.go b/libgo/go/template/set.go index 712961b..bd0dfc6 100644 --- a/libgo/go/template/set.go +++ b/libgo/go/template/set.go @@ -7,7 +7,6 @@ package template import ( "fmt" "io" - "os" "reflect" "template/parse" ) @@ -66,7 +65,7 @@ func (s *Set) Add(templates ...*Template) *Set { } // add adds the argument template to the set. -func (s *Set) add(t *Template) os.Error { +func (s *Set) add(t *Template) error { s.init() if t.set != nil { return fmt.Errorf("template: %q already in a set", t.name) @@ -92,7 +91,7 @@ func (s *Set) FuncMap() FuncMap { // Execute applies the named template to the specified data object, writing // the output to wr. -func (s *Set) Execute(wr io.Writer, name string, data interface{}) os.Error { +func (s *Set) Execute(wr io.Writer, name string, data interface{}) error { tmpl := s.tmpl[name] if tmpl == nil { return fmt.Errorf("template: no template %q in set", name) @@ -104,7 +103,7 @@ func (s *Set) Execute(wr io.Writer, name string, data interface{}) os.Error { // multiple times for a given set, adding the templates defined in the string // to the set. If a template is redefined, the element in the set is // overwritten with the new definition. -func (s *Set) Parse(text string) (*Set, os.Error) { +func (s *Set) Parse(text string) (*Set, error) { trees, err := parse.Set(text, s.leftDelim, s.rightDelim, s.parseFuncs, builtins) if err != nil { return nil, err |