diff options
Diffstat (limited to 'src/bytes/buffer.go')
| -rw-r--r-- | src/bytes/buffer.go | 10 |
1 files changed, 5 insertions, 5 deletions
diff --git a/src/bytes/buffer.go b/src/bytes/buffer.go index 1aed86924d..992a9585e7 100644 --- a/src/bytes/buffer.go +++ b/src/bytes/buffer.go @@ -44,7 +44,7 @@ var ErrTooLarge = errors.New("bytes.Buffer: too large") func (b *Buffer) Bytes() []byte { return b.buf[b.off:] } // String returns the contents of the unread portion of the buffer -// as a string. If the Buffer is a nil pointer, it returns "<nil>". +// as a string. If the Buffer is a nil pointer, it returns "<nil>". func (b *Buffer) String() string { if b == nil { // Special case, useful in debugging. @@ -145,7 +145,7 @@ func (b *Buffer) WriteString(s string) (n int, err error) { } // MinRead is the minimum slice size passed to a Read call by -// Buffer.ReadFrom. As long as the Buffer has at least MinRead bytes beyond +// Buffer.ReadFrom. As long as the Buffer has at least MinRead bytes beyond // what is required to hold the contents of r, ReadFrom will not grow the // underlying buffer. const MinRead = 512 @@ -252,7 +252,7 @@ func (b *Buffer) WriteRune(r rune) (n int, err error) { } // Read reads the next len(p) bytes from the buffer or until the buffer -// is drained. The return value n is the number of bytes read. If the +// is drained. The return value n is the number of bytes read. If the // buffer has no data to return, err is io.EOF (unless len(p) is zero); // otherwise it is nil. func (b *Buffer) Read(p []byte) (n int, err error) { @@ -347,7 +347,7 @@ func (b *Buffer) UnreadRune() error { } // UnreadByte unreads the last byte returned by the most recent -// read operation. If write has happened since the last read, UnreadByte +// read operation. If write has happened since the last read, UnreadByte // returns an error. func (b *Buffer) UnreadByte() error { if b.lastRead != opReadRune && b.lastRead != opRead { @@ -400,7 +400,7 @@ func (b *Buffer) ReadString(delim byte) (line string, err error) { } // NewBuffer creates and initializes a new Buffer using buf as its initial -// contents. It is intended to prepare a Buffer to read existing data. It +// contents. It is intended to prepare a Buffer to read existing data. It // can also be used to size the internal buffer for writing. To do that, // buf should have the desired capacity but a length of zero. // |
