MCPcopy Create free account
hub / github.com/segmentio/encoding / skipBinary

Function skipBinary

thrift/decode.go:646–661  ·  view source on GitHub ↗
(r Reader)

Source from the content-addressed store, hash-verified

644}
645
646func skipBinary(r Reader) error {
647 n, err := r.ReadLength()
648 if err != nil {
649 return err
650 }
651 if n == 0 {
652 return nil
653 }
654 switch x := r.Reader().(type) {
655 case *bufio.Reader:
656 _, err = x.Discard(int(n))
657 default:
658 _, err = io.CopyN(io.Discard, x, int64(n))
659 }
660 return dontExpectEOF(err)
661}
662
663func skipList(r Reader) error {
664 return readList(r, skip)

Callers 1

skipFunction · 0.85

Calls 3

dontExpectEOFFunction · 0.85
ReadLengthMethod · 0.65
ReaderMethod · 0.65

Tested by

no test coverage detected

Used in the wild real call sites across dependent graphs

searching dependent graphs…