X-Git-Url: http://www.git.stargrave.org/?a=blobdiff_plain;f=peerid.go;h=301c0e946dc8ce53124d56561850ee0763afdafc;hb=HEAD;hp=c9e3f4cdae94ac8f93ba6f4a283c296f40aff84a;hpb=e13b0eccbfaeecbbc68d9131b47922a0c671718f;p=btrtrc.git diff --git a/peerid.go b/peerid.go index c9e3f4cd..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