WriteInt32 writes a int32 value to buffer and advances offset.
(value int32, offset int)
| 313 | |
| 314 | // WriteInt32 writes a int32 value to buffer and advances offset. |
| 315 | func (b *BufferWriter) WriteInt32(value int32, offset int) error { |
| 316 | if offset+4 > len(b.buffer) { |
| 317 | return StackError(nil, "Failed to write int32 to buffer at offset %d", offset) |
| 318 | } |
| 319 | *(*int32)(unsafe.Pointer(&b.buffer[offset])) = value |
| 320 | return nil |
| 321 | } |
| 322 | |
| 323 | // WriteInt64 writes a int64 value to buffer and advances offset. |
| 324 | func (b *BufferWriter) WriteInt64(value int64, offset int) error { |
no test coverage detected