MCPcopy
hub / github.com/CodisLabs/codis / ReadByte

Method ReadByte

pkg/utils/bufio2/bufio.go:88–100  ·  view source on GitHub ↗
()

Source from the content-addressed store, hash-verified

86}
87
88func (b *Reader) ReadByte() (byte, error) {
89 if b.err != nil {
90 return 0, b.err
91 }
92 if b.buffered() == 0 {
93 if b.fill() != nil {
94 return 0, b.err
95 }
96 }
97 c := b.buf[b.rpos]
98 b.rpos += 1
99 return c, nil
100}
101
102func (b *Reader) PeekByte() (byte, error) {
103 if b.err != nil {

Callers 3

TestReadByteFunction · 0.80
decodeRespMethod · 0.80
decodeMultiBulkMethod · 0.80

Calls 2

bufferedMethod · 0.95
fillMethod · 0.95

Tested by 1

TestReadByteFunction · 0.64