MCPcopy Create free account
hub / github.com/LagrangeDev/LagrangeGo / ReadAll

Method ReadAll

utils/binary/reader.go:66–80  ·  view source on GitHub ↗

ReadAll means read all available data and return them if r.reader got error, it will return nil

()

Source from the content-addressed store, hash-verified

64//
65// if r.reader got error, it will return nil
66func (r *Reader) ReadAll() []byte {
67 if r.reader != nil {
68 data, err := io.ReadAll(r.reader)
69 if err != nil {
70 return nil
71 }
72 return data
73 }
74 s := r.buffer[r.pos:]
75 r.pos = 0
76 r.buffer = r.buffer[:0]
77 buf := make([]byte, len(s))
78 copy(buf, s)
79 return s
80}
81
82func (r *Reader) ReadU8() (v uint8) {
83 if r.reader != nil {

Callers 12

ReadResponseMethod · 0.95
readSSOFrameMethod · 0.95
GetGroupAlbumMethod · 0.80
uploadGroupAlbumBlockMethod · 0.80
sendHighwayPacketFunction · 0.80
GetNewDeviceVerifyURLMethod · 0.80
NewDeviceVerifyMethod · 0.80
FetchEssenceMessageMethod · 0.80
GetGroupHonorInfoMethod · 0.80
decodeFunction · 0.80
StringMethod · 0.80

Calls

no outgoing calls

Tested by

no test coverage detected