X-Git-Url: http://www.git.stargrave.org/?a=blobdiff_plain;f=peerid.go;h=301c0e946dc8ce53124d56561850ee0763afdafc;hb=HEAD;hp=9d8bf1cc608566de19503bf53cba6d3a2728ac39;hpb=c44ee5fec4592cdfe5b8e0f40121ea6664144c5c;p=btrtrc.git diff --git a/peerid.go b/peerid.go index 9d8bf1cc..301c0e94 100644 --- a/peerid.go +++ b/peerid.go @@ -1,14 +1,5 @@ package torrent -import ( - "encoding/hex" -) +import "github.com/anacrolix/torrent/types" -type peerID [20]byte - -func (me peerID) String() string { - if me[0] == '-' && me[7] == '-' { - return string(me[:8]) + hex.EncodeToString(me[8:]) - } - return hex.EncodeToString(me[:]) -} +type PeerID = types.PeerID