MCPcopy Create free account
hub / github.com/DNAProject/DNA / ReadUint8

Function ReadUint8

common/serialization/serialize.go:191–198  ·  view source on GitHub ↗
(reader io.Reader)

Source from the content-addressed store, hash-verified

189}
190
191func ReadUint8(reader io.Reader) (uint8, error) {
192 var p [1]byte
193 _, err := io.ReadFull(reader, p[:])
194 if err != nil {
195 return 0, ErrEof
196 }
197 return uint8(p[0]), nil
198}
199
200func ReadUint16(reader io.Reader) (uint16, error) {
201 var p [2]byte

Callers 1

TestReadWriteIntFunction · 0.85

Calls

no outgoing calls

Tested by 1

TestReadWriteIntFunction · 0.68