mustPeekBuffered peeks at all currently buffered bytes without advancing the reader. If no bytes are buffered, it peeks at least 1 byte. If an error occurs, it sets d.err and returns false. If io.EOF is encountered, it sets d.err to a more descriptive error.
()
| 840 | // If an error occurs, it sets d.err and returns false. |
| 841 | // If io.EOF is encountered, it sets d.err to a more descriptive error. |
| 842 | func (d *Decoder) mustPeekBuffered() ([]byte, bool) { |
| 843 | toPeek := max(d.r.Buffered(), 1) |
| 844 | return d.mustPeek(toPeek) |
| 845 | } |
| 846 | |
| 847 | // discard discards the next n bytes from the reader. |
| 848 | func (d *Decoder) discard(n int) bool { |
no test coverage detected