MCPcopy
hub / github.com/minio/minio-go / newHashReaderWrapper

Function newHashReaderWrapper

utils.go:718–724  ·  view source on GitHub ↗

newHashReaderWrapper will hash all reads done through r. When r returns io.EOF the done function will be called with the sum.

(r io.Reader, h hash.Hash, done func(hash []byte))

Source from the content-addressed store, hash-verified

716// newHashReaderWrapper will hash all reads done through r.
717// When r returns io.EOF the done function will be called with the sum.
718func newHashReaderWrapper(r io.Reader, h hash.Hash, done func(hash []byte)) *hashReaderWrapper {
719 return &hashReaderWrapper{
720 r: r,
721 h: h,
722 done: done,
723 }
724}
725
726type hashReaderWrapper struct {
727 r io.Reader

Callers 2

executeMethodMethod · 0.85

Calls

no outgoing calls

Tested by

no test coverage detected