From 129a86b3a6780b7aee5a7469cc5adeaf2ea6c20f Mon Sep 17 00:00:00 2001 From: n-peugnet Date: Fri, 27 Aug 2021 18:38:07 +0200 Subject: add findSimilarChunks method to test sketches Still missing a real test... --- chunk.go | 2 ++ 1 file changed, 2 insertions(+) (limited to 'chunk.go') diff --git a/chunk.go b/chunk.go index 0746fde..20dfe58 100644 --- a/chunk.go +++ b/chunk.go @@ -45,9 +45,11 @@ func (c *Chunk) Read(buff []byte) (int, error) { func (c *Chunk) Reader() (ChunkReader, error) { if c.Value != nil { + log.Printf("Chunk %d: Reading from in-memory value\n", c.Id) return bytes.NewReader(c.Value), nil } if c.Id != nil { + log.Printf("Chunk %d: Reading from file\n", c.Id) return c.Id.Reader(c.Repo.path), nil } return nil, &ChunkError{"Uninitialized chunk"} -- cgit v1.2.3