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

Method writeNullString

protocol/encode.go:258–265  ·  view source on GitHub ↗
(s string)

Source from the content-addressed store, hash-verified

256}
257
258func (e *encoder) writeNullString(s string) {
259 if s == "" {
260 e.writeInt16(-1)
261 } else {
262 e.writeInt16(int16(len(s)))
263 e.WriteString(s)
264 }
265}
266
267func (e *encoder) writeCompactNullString(s string) {
268 if s == "" {

Callers 2

WriteRequestFunction · 0.95
encodeNullStringMethod · 0.95

Calls 2

writeInt16Method · 0.95
WriteStringMethod · 0.95

Tested by

no test coverage detected