Clean up types more

This commit is contained in:
Justin Li
2014-07-17 01:14:50 -04:00
parent 9dde295b7c
commit 67a8473f6e
4 changed files with 12 additions and 11 deletions
+3 -2
View File
@@ -35,6 +35,7 @@ type Peer struct {
}
type PeerList []Peer
type PeerMap map[string]Peer
// NewPeer returns the Peer representation of an Announce. When provided nil
// for the announce parameter, it panics. When provided nil for the user or
@@ -79,8 +80,8 @@ type Torrent struct {
ID uint64 `json:"id"`
Infohash string `json:"infohash"`
Seeders map[string]Peer `json:"seeders"`
Leechers map[string]Peer `json:"leechers"`
Seeders PeerMap `json:"seeders"`
Leechers PeerMap `json:"leechers"`
Snatches uint64 `json:"snatches"`
UpMultiplier float64 `json:"up_multiplier"`