mirror of
https://github.com/ipfs/kubo.git
synced 2025-06-28 00:39:31 +08:00
added u.Key.String
This commit is contained in:
@ -39,11 +39,12 @@ var ErrNotFound = ds.ErrNotFound
|
||||
// Key is a string representation of multihash for use with maps.
|
||||
type Key string
|
||||
|
||||
// String returns Key in a b58 encoded string
|
||||
// String is utililty function for printing out keys as strings (Pretty).
|
||||
func (k Key) String() string {
|
||||
return b58.Encode([]byte(k))
|
||||
return key.Pretty()
|
||||
}
|
||||
|
||||
// Pretty returns Key in a b58 encoded string
|
||||
func (k Key) Pretty() string {
|
||||
return b58.Encode([]byte(k))
|
||||
}
|
||||
|
Reference in New Issue
Block a user