aboutsummaryrefslogtreecommitdiff
path: root/internal/hash/hash.go
diff options
context:
space:
mode:
authorDimitri Sokolyuk <demon@dim13.org>2019-01-16 01:07:38 +0100
committerDimitri Sokolyuk <demon@dim13.org>2019-01-16 01:07:38 +0100
commit65f780cdcff14da4c3214fe9ed597c3f8629c923 (patch)
tree322cc9a23c331a84f765f3694d09c7a5a7dc8206 /internal/hash/hash.go
parent75dcd2d3f84836e7a362f8b2027093838439ee57 (diff)
add log2
Diffstat (limited to 'internal/hash/hash.go')
-rw-r--r--internal/hash/hash.go6
1 files changed, 5 insertions, 1 deletions
diff --git a/internal/hash/hash.go b/internal/hash/hash.go
index 4a718be..8662817 100644
--- a/internal/hash/hash.go
+++ b/internal/hash/hash.go
@@ -9,10 +9,14 @@ const (
type Hash struct {
file *os.File
+ hash func([]byte) uint32
}
func New(file *os.File) *Hash {
- return &Hash{file: file}
+ return &Hash{
+ file: file,
+ hash: defaultHash,
+ }
}
func (h *Hash) Close() error {