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

Method Write

internal/gitproto/push.go:428–435  ·  view source on GitHub ↗
(p []byte)

Source from the content-addressed store, hash-verified

426}
427
428func (cw *countingWriter) Write(p []byte) (int, error) {
429 n, err := cw.w.Write(p)
430 cw.n.Add(int64(n))
431 if err != nil {
432 return n, fmt.Errorf("counting writer: %w", err)
433 }
434 return n, nil
435}
436
437func (cw *countingWriter) Count() int64 { return cw.n.Load() }
438

Calls

no outgoing calls