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/net/parse.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/net/parse.go')
| -rw-r--r-- | src/pkg/net/parse.go | 12 |
1 files changed, 6 insertions, 6 deletions
diff --git a/src/pkg/net/parse.go b/src/pkg/net/parse.go index aa5bbf39d..cfec46f45 100644 --- a/src/pkg/net/parse.go +++ b/src/pkg/net/parse.go @@ -27,7 +27,7 @@ func (f *file) getLineFromData() (s string, ok bool) { ok = true; // move data i++; - n := len(data)-i; + n := len(data) - i; for j := 0; j < n; j++ { data[j] = data[i+j] } @@ -83,7 +83,7 @@ func countAnyByte(s string, t string) int { // Split s at any bytes in t. func splitAtBytes(s string, t string) []string { - a := make([]string, 1 + countAnyByte(s, t)); + a := make([]string, 1+countAnyByte(s, t)); n := 0; last := 0; for i := 0; i < len(s); i++ { @@ -92,7 +92,7 @@ func splitAtBytes(s string, t string) []string { a[n] = string(s[last:i]); n++; } - last = i+1; + last = i + 1; } } if last < len(s) { @@ -130,13 +130,13 @@ func xtoi(s string, i0 int) (n int, i int, ok bool) { for i = i0; i < len(s); i++ { if '0' <= s[i] && s[i] <= '9' { n *= 16; - n += int(s[i]-'0'); + n += int(s[i] - '0'); } else if 'a' <= s[i] && s[i] <= 'f' { n *= 16; - n += int(s[i]-'a')+10; + n += int(s[i]-'a') + 10; } else if 'A' <= s[i] && s[i] <= 'F' { n *= 16; - n += int(s[i]-'A')+10; + n += int(s[i]-'A') + 10; } else { break } |
