(p []byte)
| 289 | } |
| 290 | |
| 291 | func (b *ByteBuffer) WriteBinary(p []byte) { |
| 292 | b.grow(len(p)) |
| 293 | l := copy(b.data[b.writerIndex:], p) |
| 294 | if l != len(p) { |
| 295 | panic(fmt.Errorf("should write %d bytes, but written %d bytes", len(p), l)) |
| 296 | } |
| 297 | b.writerIndex += len(p) |
| 298 | } |
| 299 | |
| 300 | // ReadBool reads a bool and sets error on bounds violation |
| 301 | func (b *ByteBuffer) ReadBool(err *Error) bool { |