forked from TrueCloudLab/frostfs-node
[#176] shard: Make ID stringer to return base58 encoded string
Signed-off-by: Leonard Lyubich <leonard@nspcc.ru>
This commit is contained in:
parent
86385af67d
commit
9ab371aafb
1 changed files with 5 additions and 1 deletions
|
@ -1,5 +1,9 @@
|
||||||
package shard
|
package shard
|
||||||
|
|
||||||
|
import (
|
||||||
|
"github.com/mr-tron/base58"
|
||||||
|
)
|
||||||
|
|
||||||
// ID represents Shard identifier.
|
// ID represents Shard identifier.
|
||||||
//
|
//
|
||||||
// Each shard should have the unique ID within
|
// Each shard should have the unique ID within
|
||||||
|
@ -12,7 +16,7 @@ func NewIDFromBytes(v []byte) *ID {
|
||||||
}
|
}
|
||||||
|
|
||||||
func (id ID) String() string {
|
func (id ID) String() string {
|
||||||
return string(id)
|
return base58.Encode(id)
|
||||||
}
|
}
|
||||||
|
|
||||||
// ID returns Shard identifier.
|
// ID returns Shard identifier.
|
||||||
|
|
Loading…
Reference in a new issue