aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorDimitri Sokolyuk <demon@dim13.org>2017-07-23 23:38:20 +0200
committerDimitri Sokolyuk <demon@dim13.org>2017-07-23 23:38:20 +0200
commit377fc867b7da33a4cfd865549efe2ec22a06ece4 (patch)
treea9635a5a8f6c1c6d09e4a365e1f2900097b4c6c8
parentd7395836f1604564e50de54955975f29c87953bf (diff)
...
-rw-r--r--chksum/chksum.go6
1 files changed, 3 insertions, 3 deletions
diff --git a/chksum/chksum.go b/chksum/chksum.go
index 1666c56..589c804 100644
--- a/chksum/chksum.go
+++ b/chksum/chksum.go
@@ -39,8 +39,8 @@ type Checksum struct {
type Checklist []Checksum
type hashDef struct {
- hash func() hash.Hash
- decode func(string) ([]byte, error)
+ newHash func() hash.Hash
+ decode func(string) ([]byte, error)
}
var hashes = map[string]hashDef{
@@ -88,7 +88,7 @@ func parse(r io.Reader) (Checklist, error) {
cs := Checksum{
FileName: path.Clean(match[2]),
Bytes: bytes,
- Hash: hash.hash(),
+ Hash: hash.newHash(),
}
checklist = append(checklist, cs)
}