diff options
author | Robert Griesemer <gri@golang.org> | 2009-11-09 21:23:52 -0800 |
---|---|---|
committer | Robert Griesemer <gri@golang.org> | 2009-11-09 21:23:52 -0800 |
commit | 9aad19327eb719775a874f8f18bb15958db1d471 (patch) | |
tree | c515081857e0b9ad897c6d35b0be64fe4c346688 /src/pkg/xml/read.go | |
parent | 073e240233589933c43143c997247c33206bb066 (diff) | |
download | golang-9aad19327eb719775a874f8f18bb15958db1d471.tar.gz |
- replaced gofmt expression formatting algorithm with
rsc's algorithm
- applied gofmt -w misc src
- partial CL (last chunk)
R=rsc, r
http://go/go-review/1024041
Diffstat (limited to 'src/pkg/xml/read.go')
-rw-r--r-- | src/pkg/xml/read.go | 6 |
1 files changed, 3 insertions, 3 deletions
diff --git a/src/pkg/xml/read.go b/src/pkg/xml/read.go index b51a302b3..d5f684258 100644 --- a/src/pkg/xml/read.go +++ b/src/pkg/xml/read.go @@ -194,7 +194,7 @@ func (p *Parser) unmarshal(val reflect.Value, start *StartElement) os.Error { // Grow slice. n := v.Len(); if n >= v.Cap() { - ncap := 2*n; + ncap := 2 * n; if ncap < 4 { ncap = 4 } @@ -202,7 +202,7 @@ func (p *Parser) unmarshal(val reflect.Value, start *StartElement) os.Error { reflect.ArrayCopy(new, v); v.Set(new); } - v.SetLen(n+1); + v.SetLen(n + 1); // Recur to read element into slice. if err := p.unmarshal(v.Elem(n), start); err != nil { @@ -231,7 +231,7 @@ func (p *Parser) unmarshal(val reflect.Value, start *StartElement) os.Error { ns := ""; i := strings.LastIndex(tag, " "); if i >= 0 { - ns, tag = tag[0:i], tag[i+1 : len(tag)] + ns, tag = tag[0:i], tag[i+1:len(tag)] } if tag != start.Name.Local { return UnmarshalError("expected element type <" + tag + "> but have <" + start.Name.Local + ">") |