MCPcopy
hub / github.com/segmentio/kafka-go / writeVarBytes

Method writeVarBytes

write.go:82–90  ·  view source on GitHub ↗
(b []byte)

Source from the content-addressed store, hash-verified

80}
81
82func (wb *writeBuffer) writeVarBytes(b []byte) {
83 if b != nil {
84 wb.writeVarInt(int64(len(b)))
85 wb.Write(b)
86 } else {
87 //-1 is used to indicate nil key
88 wb.writeVarInt(-1)
89 }
90}
91
92func (wb *writeBuffer) writeBool(b bool) {
93 v := int8(0)

Callers 1

writeRecordMethod · 0.95

Calls 2

writeVarIntMethod · 0.95
WriteMethod · 0.95

Tested by

no test coverage detected