From 9ab371aafb526616350646a0739f70c39934e2ae Mon Sep 17 00:00:00 2001 From: Leonard Lyubich Date: Wed, 18 Nov 2020 14:52:26 +0300 Subject: [PATCH] [#176] shard: Make ID stringer to return base58 encoded string Signed-off-by: Leonard Lyubich --- pkg/local_object_storage/shard/id.go | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/pkg/local_object_storage/shard/id.go b/pkg/local_object_storage/shard/id.go index 01e5e93a7..c9558d35e 100644 --- a/pkg/local_object_storage/shard/id.go +++ b/pkg/local_object_storage/shard/id.go @@ -1,5 +1,9 @@ package shard +import ( + "github.com/mr-tron/base58" +) + // ID represents Shard identifier. // // Each shard should have the unique ID within @@ -12,7 +16,7 @@ func NewIDFromBytes(v []byte) *ID { } func (id ID) String() string { - return string(id) + return base58.Encode(id) } // ID returns Shard identifier.