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

Method Write

plumbing/memory.go:53–58  ·  view source on GitHub ↗
(p []byte)

Source from the content-addressed store, hash-verified

51}
52
53func (o *MemoryObject) Write(p []byte) (n int, err error) {
54 o.cont = append(o.cont, p...)
55 o.sz = int64(len(o.cont))
56
57 return len(p), nil
58}
59
60// Close releases any resources consumed by the object when it is acting as a
61// ObjectWriter.

Callers 12

TestHashMethod · 0.95
buildObjectMethod · 0.95
TestDecodeAndVerifyMethod · 0.95
newObjectFunction · 0.95
getDeltaFunction · 0.95
TestAddDeltaReaderMethod · 0.95
TestNewHasherMethod · 0.45
ComputeHashFunction · 0.45
NewHasherFunction · 0.45
TestWriterMethod · 0.45

Calls

no outgoing calls

Tested by 9

TestHashMethod · 0.76
buildObjectMethod · 0.76
TestDecodeAndVerifyMethod · 0.76
newObjectFunction · 0.76
TestAddDeltaReaderMethod · 0.76
TestNewHasherMethod · 0.36
TestWriterMethod · 0.36