MCPcopy Create free account
hub / github.com/apache/fory / WriteIntSlice

Method WriteIntSlice

go/fory/writer.go:355–371  ·  view source on GitHub ↗

WriteIntSlice writes []int with ref/type info

(value []int, refMode RefMode, writeTypeInfo bool)

Source from the content-addressed store, hash-verified

353
354// WriteIntSlice writes []int with ref/type info
355func (c *WriteContext) WriteIntSlice(value []int, refMode RefMode, writeTypeInfo bool) {
356 if refMode != RefModeNone {
357 if value == nil {
358 c.buffer.WriteInt8(NullFlag)
359 return
360 }
361 c.buffer.WriteInt8(NotNullValueFlag)
362 }
363 if writeTypeInfo {
364 if strconv.IntSize == 64 {
365 c.WriteTypeId(INT64_ARRAY)
366 } else {
367 c.WriteTypeId(INT32_ARRAY)
368 }
369 }
370 WriteIntSlice(c.buffer, value)
371}
372
373// WriteUintSlice writes []uint with ref/type info
374func (c *WriteContext) WriteUintSlice(value []uint, refMode RefMode, writeTypeInfo bool) {

Callers 1

writeRemainingFieldMethod · 0.80

Calls 3

WriteTypeIdMethod · 0.95
WriteIntSliceFunction · 0.85
WriteInt8Method · 0.45

Tested by

no test coverage detected