Skip to content
This repository has been archived by the owner on Oct 9, 2023. It is now read-only.

Commit

Permalink
PR Feedback
Browse files Browse the repository at this point in the history
Signed-off-by: Haytham Abuelfutuh <[email protected]>
  • Loading branch information
EngHabu committed Jul 10, 2023
1 parent facee26 commit c392b71
Showing 1 changed file with 5 additions and 2 deletions.
7 changes: 5 additions & 2 deletions storage/mem_store.go
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@ import (
"bytes"
"context"
"crypto/md5"
"encoding/base32"
"encoding/hex"
"fmt"
"io"
"io/ioutil"
Expand Down Expand Up @@ -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) {
Expand Down

0 comments on commit c392b71

Please sign in to comment.