2
0
mirror of synced 2025-02-23 06:08:07 +00:00
torrent/types/peerid.go
Matt Joiner 5501f994ca
Move a bunch of stuff into subpackages
The core package is very large now, and often only parts of it are needed.
2022-11-15 23:31:26 +11:00

15 lines
392 B
Go

package types
// Peer client ID.
type PeerID [20]byte
// // Pretty prints the ID as hex, except parts that adher to the PeerInfo ID
// // Conventions of BEP 20.
// func (me PeerID) String() string {
// // if me[0] == '-' && me[7] == '-' {
// // return string(me[:8]) + hex.EncodeToString(me[8:])
// // }
// // return hex.EncodeToString(me[:])
// return fmt.Sprintf("%+q", me[:])
// }