SplitUnsafe modifies the receiver to point to the first n bytes while it returns a new reference to the remaining bytes. The returned Buffer functions just like a normal reference acquired using Ref().
(buf Buffer, n int)
| 254 | // returns a new reference to the remaining bytes. The returned Buffer |
| 255 | // functions just like a normal reference acquired using Ref(). |
| 256 | func SplitUnsafe(buf Buffer, n int) (left, right Buffer) { |
| 257 | return buf.split(n) |
| 258 | } |
| 259 | |
| 260 | type emptyBuffer struct{} |
| 261 |