Skip to content

Commit

Permalink
Add comment to metainfo.MetaInfo.CreationDate
Browse files Browse the repository at this point in the history
  • Loading branch information
anacrolix committed May 13, 2020
1 parent ccc7146 commit 587f28d
Showing 1 changed file with 8 additions and 5 deletions.
13 changes: 8 additions & 5 deletions metainfo/metainfo.go
Original file line number Diff line number Diff line change
Expand Up @@ -13,11 +13,14 @@ type MetaInfo struct {
Announce string `bencode:"announce,omitempty"` // BEP 3
AnnounceList AnnounceList `bencode:"announce-list,omitempty"` // BEP 12
Nodes []Node `bencode:"nodes,omitempty"` // BEP 5
CreationDate int64 `bencode:"creation date,omitempty,ignore_unmarshal_type_error"`
Comment string `bencode:"comment,omitempty"`
CreatedBy string `bencode:"created by,omitempty"`
Encoding string `bencode:"encoding,omitempty"`
UrlList UrlList `bencode:"url-list,omitempty"` // BEP 19
// Where's this specified? Mentioned at
// https://wiki.theory.org/index.php/BitTorrentSpecification: (optional) the creation time of
// the torrent, in standard UNIX epoch format (integer, seconds since 1-Jan-1970 00:00:00 UTC)
CreationDate int64 `bencode:"creation date,omitempty,ignore_unmarshal_type_error"`
Comment string `bencode:"comment,omitempty"`
CreatedBy string `bencode:"created by,omitempty"`
Encoding string `bencode:"encoding,omitempty"`
UrlList UrlList `bencode:"url-list,omitempty"` // BEP 19
}

// Load a MetaInfo from an io.Reader. Returns a non-nil error in case of
Expand Down

0 comments on commit 587f28d

Please sign in to comment.