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

Function readBoolListValues

go/fory/slice_primitive_list.go:471–483  ·  view source on GitHub ↗
(buf *ByteBuffer, err *Error, length int, hasNull bool)

Source from the content-addressed store, hash-verified

469}
470
471func readBoolListValues(buf *ByteBuffer, err *Error, length int, hasNull bool) []bool {
472 result := make([]bool, length)
473 if !hasNull {
474 buf.Read(unsafe.Slice((*byte)(unsafe.Pointer(&result[0])), length))
475 return result
476 }
477 for i := 0; i < length; i++ {
478 if buf.ReadInt8(err) != NullFlag {
479 result[i] = buf.ReadBool(err)
480 }
481 }
482 return result
483}
484
485func writeInt8ListValues(buf *ByteBuffer, value []int8) {
486 if len(value) > 0 {

Callers 1

readValuesMethod · 0.85

Calls 4

SliceMethod · 0.80
ReadMethod · 0.65
ReadInt8Method · 0.45
ReadBoolMethod · 0.45

Tested by

no test coverage detected