Skip to content

Commit 9d48f8a

Browse files
committed
resolve [Ian Lance Taylor] review
1 parent 88b79fe commit 9d48f8a

File tree

1 file changed

+5
-5
lines changed

1 file changed

+5
-5
lines changed

src/bufio/bufio.go

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -132,11 +132,11 @@ func (b *Reader) readErr() error {
132132
return err
133133
}
134134

135-
// Peek returns the next n bytes without advancing the reader. If b.Buffered() < n,
136-
// tries to read a new chunk into b's buffer. The bytes stop being valid at the
137-
// next read call. If Peek returns fewer than n bytes, it also returns an error
138-
// explaining why the read is short. The error is [ErrBufferFull] if n is larger
139-
// than b's buffer size.
135+
// Peek returns the next n bytes without advancing the reader. The bytes stop
136+
// being valid at the next read call. If necessary, Peek will read more bytes
137+
// into the buffer in order to make n bytes available. If Peek returns fewer
138+
// than n bytes, it also returns an error explaining why the read is short.
139+
// The error is [ErrBufferFull] if n is larger than b's buffer size.
140140
//
141141
// Calling Peek prevents a [Reader.UnreadByte] or [Reader.UnreadRune] call from succeeding
142142
// until the next read operation.

0 commit comments

Comments
 (0)