]> Cypherpunks repositories - gostls13.git/commitdiff
gofmt-ify bytes
authorRobert Griesemer <gri@golang.org>
Thu, 5 Nov 2009 00:49:28 +0000 (16:49 -0800)
committerRobert Griesemer <gri@golang.org>
Thu, 5 Nov 2009 00:49:28 +0000 (16:49 -0800)
R=r
http://go/go-review/1016044

src/pkg/bytes/buffer.go
src/pkg/bytes/bytes.go

index 6e5887cb0b590376b81dcbd12bf030d5f47aac52..875086525e6deaf64d30d8f80ea6d457d66b1ee6 100644 (file)
@@ -46,7 +46,7 @@ func (b *Buffer) Bytes() []byte {
 func (b *Buffer) String() string {
        if b == nil {
                // Special case, useful in debugging.
-               return "<nil>"
+               return "<nil>";
        }
        return string(b.buf[b.off : len(b.buf)]);
 }
index cb543991c9fe28bbce98cb6d0381f5c556db5aff..05d87fcb6a53766a7a5f05b63af371fd2a8a65a6 100644 (file)
@@ -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];
                        }