MCPcopy Index your code
hub / github.com/uber/aresdb / WriteInt32

Method WriteInt32

utils/serialization.go:315–321  ·  view source on GitHub ↗

WriteInt32 writes a int32 value to buffer and advances offset.

(value int32, offset int)

Source from the content-addressed store, hash-verified

313
314// WriteInt32 writes a int32 value to buffer and advances offset.
315func (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.
324func (b *BufferWriter) WriteInt64(value int64, offset int) error {

Callers 4

AppendInt32Method · 0.95

Calls 1

StackErrorFunction · 0.85

Tested by

no test coverage detected