diff options
| author | Robert Griesemer <gri@golang.org> | 2009-11-04 16:49:28 -0800 |
|---|---|---|
| committer | Robert Griesemer <gri@golang.org> | 2009-11-04 16:49:28 -0800 |
| commit | 688a6ff71da455d001c57d03395de87a69fb967a (patch) | |
| tree | 258e867ccc33a4bb77c798e21d202f720d42d6d2 /src/pkg/bytes/bytes.go | |
| parent | 789b31a416d1c321984d6ede3381f41b11570740 (diff) | |
| download | go-688a6ff71da455d001c57d03395de87a69fb967a.tar.xz | |
gofmt-ify bytes
R=r
http://go/go-review/1016044
Diffstat (limited to 'src/pkg/bytes/bytes.go')
| -rw-r--r-- | src/pkg/bytes/bytes.go | 5 |
1 files changed, 3 insertions, 2 deletions
diff --git a/src/pkg/bytes/bytes.go b/src/pkg/bytes/bytes.go index cb543991c9..05d87fcb6a 100644 --- a/src/pkg/bytes/bytes.go +++ b/src/pkg/bytes/bytes.go @@ -142,7 +142,7 @@ func genSplit(s, sep []byte, sepSave, n int) [][]byte { na := 0; for i := 0; i+len(sep) <= len(s) && na+1 < n; i++ { if s[i] == c && (len(sep) == 1 || Equal(s[i : i+len(sep)], sep)) { - a[na] = s[start:i+sepSave]; + a[na] = s[start : i+sepSave]; na++; start = i+len(sep); i += len(sep)-1; @@ -278,7 +278,8 @@ func TrimSpace(s []byte) []byte { rune := int(s[end-1]); if rune >= utf8.RuneSelf { // Back up carefully looking for beginning of rune. Mustn't pass start. - for wid = 2; start <= end-wid && !utf8.RuneStart(s[end-wid]); wid++ {} + for wid = 2; start <= end-wid && !utf8.RuneStart(s[end-wid]); wid++ { + } if start > end-wid { // invalid UTF-8 sequence; stop processing return s[start:end]; } |
