TrimFront removes the first count bytes from the buffer.
(count int64)
| 77 | |
| 78 | // TrimFront removes the first count bytes from the buffer. |
| 79 | func (b *Buffer) TrimFront(count int64) { |
| 80 | if count >= b.size { |
| 81 | b.advanceRead(b.size) |
| 82 | } else { |
| 83 | b.advanceRead(count) |
| 84 | } |
| 85 | } |
| 86 | |
| 87 | // ReadAt implements io.ReaderAt.ReadAt. |
| 88 | func (b *Buffer) ReadAt(p []byte, offset int64) (int, error) { |