]> Sergey Matveev's repositories - btrtrc.git/blobdiff - peerid.go
Change a bunch of Stringer and status stuff
[btrtrc.git] / peerid.go
index 1514b79c02ccf0b4fdacb867a2839f331a0bc6ed..9bc947544bb8d8a399c2800e58b2fbe9b8360ce3 100644 (file)
--- a/peerid.go
+++ b/peerid.go
@@ -1,17 +1,14 @@
 package torrent
 
-import (
-       "encoding/hex"
-)
-
 // Peer client ID.
 type PeerID [20]byte
 
-// Pretty prints the ID as hex, except parts that adher to the Peer 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[:])
-}
+// // Pretty prints the ID as hex, except parts that adher to the Peer 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[:])
+// }