From b98e48836f9d3b561e1958614cd0304ee43bc5f8 Mon Sep 17 00:00:00 2001 From: Juan Batiz-Benet Date: Tue, 7 Oct 2014 05:00:19 -0700 Subject: [PATCH] added u.Key.String --- util/util.go | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) 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)) }