File tree Expand file tree Collapse file tree 1 file changed +5
-5
lines changed Expand file tree Collapse file tree 1 file changed +5
-5
lines changed Original file line number Diff line number Diff line change @@ -132,11 +132,11 @@ func (b *Reader) readErr() error {
132
132
return err
133
133
}
134
134
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.
140
140
//
141
141
// Calling Peek prevents a [Reader.UnreadByte] or [Reader.UnreadRune] call from succeeding
142
142
// until the next read operation.
You can’t perform that action at this time.
0 commit comments