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

Function bytesEncodeFuncOf

protocol/encode.go:422–435  ·  view source on GitHub ↗
(flexible bool, tag structTag)

Source from the content-addressed store, hash-verified

420}
421
422func bytesEncodeFuncOf(flexible bool, tag structTag) encodeFunc {
423 switch {
424 case flexible && tag.Nullable:
425 // In flexible messages, all arrays are compact
426 return (*encoder).encodeCompactNullBytes
427 case flexible:
428 // In flexible messages, all arrays are compact
429 return (*encoder).encodeCompactBytes
430 case tag.Nullable:
431 return (*encoder).encodeNullBytes
432 default:
433 return (*encoder).encodeBytes
434 }
435}
436
437func structEncodeFuncOf(typ reflect.Type, version int16, flexible bool) encodeFunc {
438 type field struct {

Callers 1

encodeFuncOfFunction · 0.85

Calls

no outgoing calls

Tested by

no test coverage detected