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

Method ReadTlv

utils/binary/reader.go:205–214  ·  view source on GitHub ↗
()

Source from the content-addressed store, hash-verified

203}
204
205func (r *Reader) ReadTlv() (result map[uint16][]byte) {
206 result = map[uint16][]byte{}
207 count := r.ReadU16()
208
209 for i := 0; i < int(count); i++ {
210 tag := r.ReadU16()
211 result[tag] = r.ReadBytes(int(r.ReadU16()))
212 }
213 return
214}
215
216func (r *Reader) ReadI8() (v int8) {
217 return int8(r.ReadU8())

Callers 3

decodeLoginResponseMethod · 0.95
FetchQRCodeMethod · 0.95
GetQRCodeResultMethod · 0.95

Calls 2

ReadU16Method · 0.95
ReadBytesMethod · 0.95

Tested by

no test coverage detected