import "time" type File struct { Length int `bencode:"length"` MD5Sum []byte `bencode:"md5sum,omitempty"` Path string `bencode:"path"` } type Info struct { Length int `bencode:"length"` MD5Sum []byte `bencode:"md5sum,omitempty"` Name string `bencode:"name"` PieceLength int `bencode:"piece length"` Pieces []byte `bencode:"pieces"` Files []File `bencode:"files"` } type Torrent struct { Announce string `bencode:"announce"` AnnounceList []string `bencode:"announce-list,omitemtpy"` Comment string `bencode:"comment"` CreatedBy string `bencode:"created by,omitempty"` CreationDate time.Time `bencode:"creation date"` HTTPSeeds []string `bencode:"httpseeds"` // not in draft Info Info `bencode:"info"` URLList string `bencode:"url-list,omitemtpy"` // not in draft }