1
0
mirror of https://github.com/ipfs/kubo.git synced 2025-06-28 00:39:31 +08:00

peer.DecodePrettyID

This commit is contained in:
Juan Batiz-Benet
2014-09-19 05:00:50 -07:00
committed by Brian Tiger Chow
parent d040104762
commit 569268c676

View File

@ -26,6 +26,11 @@ func (id ID) Pretty() string {
return b58.Encode(id)
}
// DecodePrettyID returns a b58-encoded string of the ID
func DecodePrettyID(s string) ID {
return b58.Decode(s)
}
// Map maps Key (string) : *Peer (slices are not comparable).
type Map map[u.Key]*Peer