Remove removes the last n bytes.
(n int)
| 58 | |
| 59 | // Remove removes the last n bytes. |
| 60 | func (b *buffer) Remove(n int) { |
| 61 | l := len(*b) |
| 62 | n = min(n, l) |
| 63 | *b = (*b)[:l-n] |
| 64 | } |
| 65 | |
| 66 | // Bytes returns the contents of the buffer as a byte slice. |
| 67 | func (b *buffer) Bytes() []byte { |
no outgoing calls