MCPcopy
hub / github.com/go-git/go-git / ReadUint32

Function ReadUint32

utils/binary/read.go:138–145  ·  view source on GitHub ↗

ReadUint32 reads 4 bytes and returns them as a BigEndian uint32

(r io.Reader)

Source from the content-addressed store, hash-verified

136
137// ReadUint32 reads 4 bytes and returns them as a BigEndian uint32
138func ReadUint32(r io.Reader) (uint32, error) {
139 var v uint32
140 if err := binary.Read(r, binary.BigEndian, &v); err != nil {
141 return 0, err
142 }
143
144 return v, nil
145}
146
147// ReadUint16 reads 2 bytes and returns them as a BigEndian uint16
148func ReadUint16(r io.Reader) (uint16, error) {

Callers 13

DecodeMethod · 0.92
getExtensionReaderMethod · 0.92
validateHeaderFunction · 0.92
DecodeMethod · 0.92
readVersionMethod · 0.92
readCountMethod · 0.92
readVersionFunction · 0.92
readFanoutFunction · 0.92
readFanoutMethod · 0.92
GetCommitDataByIndexMethod · 0.92
readFanoutMethod · 0.92
GetCommitDataByIndexMethod · 0.92

Calls 1

ReadMethod · 0.45

Tested by 1

TestReadUint32Method · 0.68

Used in the wild real call sites across dependent graphs

searching dependent graphs…