MCPcopy Index your code
hub / github.com/tinylib/msgp / ReadInt8

Method ReadInt8

msgp/read.go:773–782  ·  view source on GitHub ↗

ReadInt8 reads an int8 from the reader

()

Source from the content-addressed store, hash-verified

771
772// ReadInt8 reads an int8 from the reader
773func (m *Reader) ReadInt8() (i int8, err error) {
774 var in int64
775 in, err = m.ReadInt64()
776 if in > math.MaxInt8 || in < math.MinInt8 {
777 err = IntOverflow{Value: in, FailedBitsize: 8}
778 return
779 }
780 i = int8(in)
781 return
782}
783
784// ReadInt reads an int from the reader
785func (m *Reader) ReadInt() (i int, err error) {

Callers 4

TestReadIntOverflowsFunction · 0.95
FuzzReaderFunction · 0.95
DecodeMsgMethod · 0.80
DecodeMsgMethod · 0.80

Calls 1

ReadInt64Method · 0.95

Tested by 2

TestReadIntOverflowsFunction · 0.76
FuzzReaderFunction · 0.76