mirror of
https://github.com/octoleo/restic.git
synced 2024-11-22 21:05:10 +00:00
Merge pull request #3754 from greatroar/simplify-hashing
hashing: Fix up comments
This commit is contained in:
commit
b52c631bd3
@ -5,14 +5,13 @@ import (
|
||||
"io"
|
||||
)
|
||||
|
||||
// Reader hashes all data read from the underlying reader.
|
||||
// A Reader hashes all data read from the underlying reader.
|
||||
type Reader struct {
|
||||
r io.Reader
|
||||
h hash.Hash
|
||||
}
|
||||
|
||||
// NewReader returns a new Reader that uses the hash h. If the underlying
|
||||
// reader supports WriteTo then the returned reader will do so too.
|
||||
// NewReader returns a new Reader that uses the hash h.
|
||||
func NewReader(r io.Reader, h hash.Hash) *Reader {
|
||||
return &Reader{r: r, h: h}
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user