MCPcopy
hub / github.com/perkeep/perkeep / Read

Method Read

pkg/blobserver/receive.go:81–89  ·  view source on GitHub ↗
(p []byte)

Source from the content-addressed store, hash-verified

79}
80
81func (c *checkHashReader) Read(p []byte) (n int, err error) {
82 n, err = c.src.Read(p)
83 c.h.Write(p[:n])
84 if err == io.EOF && !c.br.HashMatches(c.h) {
85 err = ErrCorruptBlob
86 c.corrupt = true
87 }
88 return
89}

Callers

nothing calls this directly

Calls 2

WriteMethod · 0.45
HashMatchesMethod · 0.45

Tested by

no test coverage detected