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

Function Write

utils/binary/write.go:10–18  ·  view source on GitHub ↗

Write writes the binary representation of data into w, using BigEndian order https://golang.org/pkg/encoding/binary/#Write

(w io.Writer, data ...interface{})

Source from the content-addressed store, hash-verified

8// Write writes the binary representation of data into w, using BigEndian order
9// https://golang.org/pkg/encoding/binary/#Write
10func Write(w io.Writer, data ...interface{}) error {
11 for _, v := range data {
12 if err := binary.Write(w, binary.BigEndian, v); err != nil {
13 return err
14 }
15 }
16
17 return nil
18}
19
20func WriteVariableWidthInt(w io.Writer, n int64) error {
21 buf := []byte{byte(n & 0x7f)}

Callers 11

encodeHeaderMethod · 0.92
encodeEntryMethod · 0.92
encodeEntryNameMethod · 0.92
encodeEntryNameV4Method · 0.92
encodeFooterMethod · 0.92
TestDecodeInvalidHashMethod · 0.92
headMethod · 0.92
writeRefDeltaHeaderMethod · 0.92
footerMethod · 0.92
buildTestPackFunction · 0.92
TestWriteMethod · 0.85

Calls 1

WriteMethod · 0.45

Tested by 3

TestDecodeInvalidHashMethod · 0.74
buildTestPackFunction · 0.74
TestWriteMethod · 0.68

Used in the wild real call sites across dependent graphs

searching dependent graphs…