MCPcopy Create free account
hub / github.com/go-git/go-git / Read

Function Read

utils/binary/read.go:16–24  ·  view source on GitHub ↗

Read reads structured binary data from r into data. Bytes are read and decoded in BigEndian order https://golang.org/pkg/encoding/binary/#Read

(r io.Reader, data ...interface{})

Source from the content-addressed store, hash-verified

14// decoded in BigEndian order
15// https://golang.org/pkg/encoding/binary/#Read
16func Read(r io.Reader, data ...interface{}) error {
17 for _, v := range data {
18 if err := binary.Read(r, binary.BigEndian, v); err != nil {
19 return err
20 }
21 }
22
23 return nil
24}
25
26// ReadUntil reads from r untin delim is found
27func ReadUntil(r io.Reader, delim byte) ([]byte, error) {

Callers 3

readEntryMethod · 0.92
TestReadMethod · 0.85
ReadVariableWidthIntFunction · 0.85

Calls 1

ReadMethod · 0.45

Tested by 1

TestReadMethod · 0.68