提交 b98e4883 作者: Juan Batiz-Benet

added u.Key.String

上级 5ba2efc2
......@@ -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))
}
......
Markdown 格式
0%
您添加了 0 到此讨论。请谨慎行事。
请先完成此评论的编辑!
注册 或者 后发表评论