diff options
| author | Vincent Vanackere <vincent.vanackere@gmail.com> | 2011-11-03 14:01:30 -0700 |
|---|---|---|
| committer | Rob Pike <r@golang.org> | 2011-11-03 14:01:30 -0700 |
| commit | eb1717e035e9c6b6690fd55b6396f99b40d26d3f (patch) | |
| tree | b03ee1d36d0ed7df98b4a0371afc5e569334d773 /src/pkg/bytes | |
| parent | de03d502c7e0bd07c6f084ed9b5bb0446df29b49 (diff) | |
| download | go-eb1717e035e9c6b6690fd55b6396f99b40d26d3f.tar.xz | |
all: rename os.EOF to io.EOF in various non-code contexts
R=golang-dev, r
CC=golang-dev
https://golang.org/cl/5334050
Diffstat (limited to 'src/pkg/bytes')
| -rw-r--r-- | src/pkg/bytes/buffer.go | 12 |
1 files changed, 6 insertions, 6 deletions
diff --git a/src/pkg/bytes/buffer.go b/src/pkg/bytes/buffer.go index fbfd6210b6..d1a5b68dc8 100644 --- a/src/pkg/bytes/buffer.go +++ b/src/pkg/bytes/buffer.go @@ -117,7 +117,7 @@ const MinRead = 512 // ReadFrom reads data from r until EOF and appends it to the buffer. // The return value n is the number of bytes read. -// Any error except os.EOF encountered during the read +// Any error except io.EOF encountered during the read // is also returned. func (b *Buffer) ReadFrom(r io.Reader) (n int64, err error) { b.lastRead = opInvalid @@ -200,7 +200,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 -// buffer has no data to return, err is os.EOF even if len(p) is zero; +// buffer has no data to return, err is io.EOF even if len(p) is zero; // otherwise it is nil. func (b *Buffer) Read(p []byte) (n int, err error) { b.lastRead = opInvalid @@ -236,7 +236,7 @@ func (b *Buffer) Next(n int) []byte { } // ReadByte reads and returns the next byte from the buffer. -// If no byte is available, it returns error os.EOF. +// If no byte is available, it returns error io.EOF. func (b *Buffer) ReadByte() (c byte, err error) { b.lastRead = opInvalid if b.off >= len(b.buf) { @@ -252,7 +252,7 @@ func (b *Buffer) ReadByte() (c byte, err error) { // ReadRune reads and returns the next UTF-8-encoded // Unicode code point from the buffer. -// If no bytes are available, the error returned is os.EOF. +// If no bytes are available, the error returned is io.EOF. // If the bytes are an erroneous UTF-8 encoding, it // consumes one byte and returns U+FFFD, 1. func (b *Buffer) ReadRune() (r rune, size int, err error) { @@ -307,7 +307,7 @@ func (b *Buffer) UnreadByte() error { // ReadBytes reads until the first occurrence of delim in the input, // returning a slice containing the data up to and including the delimiter. // If ReadBytes encounters an error before finding a delimiter, -// it returns the data read before the error and the error itself (often os.EOF). +// it returns the data read before the error and the error itself (often io.EOF). // ReadBytes returns err != nil if and only if the returned data does not end in // delim. func (b *Buffer) ReadBytes(delim byte) (line []byte, err error) { @@ -326,7 +326,7 @@ func (b *Buffer) ReadBytes(delim byte) (line []byte, err error) { // ReadString reads until the first occurrence of delim in the input, // returning a string containing the data up to and including the delimiter. // If ReadString encounters an error before finding a delimiter, -// it returns the data read before the error and the error itself (often os.EOF). +// it returns the data read before the error and the error itself (often io.EOF). // ReadString returns err != nil if and only if the returned data does not end // in delim. func (b *Buffer) ReadString(delim byte) (line string, err error) { |
