forked from TrueCloudLab/frostfs-node
3028718691
Replace UUID implementation of ID with byte slice. Signed-off-by: Leonard Lyubich <leonard@nspcc.ru>
17 lines
276 B
Go
17 lines
276 B
Go
package blobovnicza
|
|
|
|
import (
|
|
"encoding/hex"
|
|
)
|
|
|
|
// ID represents Blobovnicza identifier.
|
|
type ID []byte
|
|
|
|
// NewIDFromBytes constructs ID from byte slice.
|
|
func NewIDFromBytes(v []byte) *ID {
|
|
return (*ID)(&v)
|
|
}
|
|
|
|
func (id ID) String() string {
|
|
return hex.EncodeToString(id)
|
|
}
|