From d97f049cec6e470d5a2efaf2a85968fe141af6c8 Mon Sep 17 00:00:00 2001 From: Dimitri Sokolyuk Date: Sat, 11 Jun 2016 03:39:35 +0200 Subject: Add Time type --- torrent/torrent.go | 18 ++++++++++-------- 1 file changed, 10 insertions(+), 8 deletions(-) (limited to 'torrent/torrent.go') diff --git a/torrent/torrent.go b/torrent/torrent.go index 0f7d673..533db86 100644 --- a/torrent/torrent.go +++ b/torrent/torrent.go @@ -1,5 +1,7 @@ package torrent +import "time" + type File struct { Length int `bencode:"length"` MD5Sum []byte `bencode:"md5sum,optional"` @@ -16,12 +18,12 @@ type Info struct { } type Torrent struct { - Announce string `bencode:"announce"` - AnnounceList []string `bencode:"announce-list,optional"` - Comment string `bencode:"comment"` - CreatedBy string `bencode:"created by,optional"` - CreationDate int `bencode:"creation date"` // time.Time (unix time) - HTTPSeeds []string `bencode:"httpseeds,optional"` // not in draft - Info Info `bencode:"info"` - URLList string `bencode:"url-list,optional"` // not in draft + Announce string `bencode:"announce"` + AnnounceList []string `bencode:"announce-list,optional"` + Comment string `bencode:"comment"` + CreatedBy string `bencode:"created by,optional"` + CreationDate time.Time `bencode:"creation date"` // time.Time (unix time) + HTTPSeeds []string `bencode:"httpseeds,optional"` // not in draft + Info Info `bencode:"info"` + URLList string `bencode:"url-list,optional"` // not in draft } -- cgit v1.2.3