From c392b71a2ac6c2d19978a4c5d4250a305d2b1fb0 Mon Sep 17 00:00:00 2001 From: Haytham Abuelfutuh Date: Mon, 10 Jul 2023 14:45:28 -0700 Subject: [PATCH] PR Feedback Signed-off-by: Haytham Abuelfutuh --- storage/mem_store.go | 7 +++++-- 1 file changed, 5 insertions(+), 2 deletions(-) diff --git a/storage/mem_store.go b/storage/mem_store.go index 6fa88cf..976e4aa 100644 --- a/storage/mem_store.go +++ b/storage/mem_store.go @@ -4,7 +4,7 @@ import ( "bytes" "context" "crypto/md5" - "encoding/base32" + "encoding/hex" "fmt" "io" "io/ioutil" @@ -43,7 +43,10 @@ func (s *InMemoryStore) Head(ctx context.Context, reference DataReference) (Meta hash = md5.Sum(data) } - return MemoryMetadata{exists: found, size: int64(len(data)), etag: base32.StdEncoding.EncodeToString(hash[:])}, nil + return MemoryMetadata{ + exists: found, size: int64(len(data)), + etag: hex.EncodeToString(hash[:]), + }, nil } func (s *InMemoryStore) ReadRaw(ctx context.Context, reference DataReference) (io.ReadCloser, error) {