unreadByte unreads the last byte read from the reader. If an error occurs, it sets d.err and returns false. nolint:unparam
(b byte)
| 726 | // |
| 727 | //nolint:unparam |
| 728 | func (d *Decoder) unreadByte(b byte) bool { |
| 729 | if err := d.r.UnreadByte(); err != nil { |
| 730 | d.err = err |
| 731 | return false |
| 732 | } |
| 733 | if b == '\n' { |
| 734 | d.line-- |
| 735 | } |
| 736 | return true |
| 737 | } |
| 738 | |
| 739 | // readUntil reads bytes to the buffer until the specified delimiter byte is encountered. |
| 740 | // The delimiter byte is included in the buffer. |
no outgoing calls
no test coverage detected