FlushTo writes the remaining data from the reader to the provided writer.
(w io.Writer)
| 150 | |
| 151 | // FlushTo writes the remaining data from the reader to the provided writer. |
| 152 | func (d *Decoder) FlushTo(w io.Writer) error { |
| 153 | _, err := d.r.WriteTo(w) |
| 154 | return err |
| 155 | } |
| 156 | |
| 157 | // setReader sets a new reader for the decoder, wrapping it in a bufio.Reader from the pool. |
| 158 | func (d *Decoder) setReader(r io.Reader) { |