2
2
mirror of https://github.com/octoleo/restic.git synced 2024-06-05 18:40:49 +00:00

Merge pull request #3754 from greatroar/simplify-hashing

hashing: Fix up comments
This commit is contained in:
MichaelEischer 2022-05-14 15:33:51 +02:00 committed by GitHub
commit b52c631bd3
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -5,14 +5,13 @@ import (
"io" "io"
) )
// Reader hashes all data read from the underlying reader. // A Reader hashes all data read from the underlying reader.
type Reader struct { type Reader struct {
r io.Reader r io.Reader
h hash.Hash h hash.Hash
} }
// NewReader returns a new Reader that uses the hash h. If the underlying // NewReader returns a new Reader that uses the hash h.
// reader supports WriteTo then the returned reader will do so too.
func NewReader(r io.Reader, h hash.Hash) *Reader { func NewReader(r io.Reader, h hash.Hash) *Reader {
return &Reader{r: r, h: h} return &Reader{r: r, h: h}
} }