diff --git a/util/util.go b/util/util.go index d82df4a6f..0d703fd4c 100644 --- a/util/util.go +++ b/util/util.go @@ -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)) }