SetBuf sets buf as the internal buffer, where the contents of buf are considered the unread portion of the buffer.
(buf []byte)
| 85 | // SetBuf sets buf as the internal buffer, |
| 86 | // where the contents of buf are considered the unread portion of the buffer. |
| 87 | func (b *Buffer) SetBuf(buf []byte) { |
| 88 | b.buf = buf |
| 89 | b.idx = 0 |
| 90 | } |
| 91 | |
| 92 | // Reset clears the internal buffer of all written and unread data. |
| 93 | func (b *Buffer) Reset() { |
no outgoing calls