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

Function readerDecodeFuncOf

protocol/decode.go:458–468  ·  view source on GitHub ↗
(typ reflect.Type)

Source from the content-addressed store, hash-verified

456}
457
458func readerDecodeFuncOf(typ reflect.Type) decodeFunc {
459 typ = reflect.PtrTo(typ)
460 return func(d *decoder, v value) {
461 if d.err == nil {
462 _, err := v.iface(typ).(io.ReaderFrom).ReadFrom(d)
463 if err != nil {
464 d.setError(err)
465 }
466 }
467 }
468}
469
470func readInt8(b []byte) int8 {
471 return int8(b[0])

Callers 1

decodeFuncOfFunction · 0.85

Calls 3

setErrorMethod · 0.80
ReadFromMethod · 0.45
ifaceMethod · 0.45

Tested by

no test coverage detected