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

Method ReadBytes

thrift/binary.go:87–95  ·  view source on GitHub ↗
()

Source from the content-addressed store, hash-verified

85}
86
87func (r *binaryReader) ReadBytes() ([]byte, error) {
88 n, err := r.ReadLength()
89 if err != nil {
90 return nil, err
91 }
92 b := make([]byte, n)
93 _, err = io.ReadFull(r.r, b)
94 return b, err
95}
96
97func (r *binaryReader) ReadString() (string, error) {
98 b, err := r.ReadBytes()

Callers 1

ReadStringMethod · 0.95

Calls 1

ReadLengthMethod · 0.95

Tested by

no test coverage detected