added u.Key.String
Juan Batiz-Benet committed
Oct 7, 2014 at 05:00 UTC
b98e48836f9d3b561e1958614cd0304ee43bc5f8
1 file changed
+3
-2
util/util.go
+3
-2
@@ -39,11 +39,12 @@ var ErrNotFound = ds.ErrNotFound
39
// Key is a string representation of multihash for use with maps.
40
type Key string
41
42
-// String returns Key in a b58 encoded string
42
+// String is utililty function for printing out keys as strings (Pretty).
43
func (k Key) String() string {
44
- return b58.Encode([]byte(k))
44
+ return key.Pretty()
45
}
46
47
+// Pretty returns Key in a b58 encoded string
48
func (k Key) Pretty() string {
49
return b58.Encode([]byte(k))
50
}