This commit is contained in:
Matt Joiner 2017-01-18 12:09:51 +11:00
parent a11df82349
commit 902e40dd67
1 changed files with 8 additions and 7 deletions

View File

@ -14,13 +14,14 @@ import (
// The info dictionary. // The info dictionary.
type Info struct { type Info struct {
PieceLength int64 `bencode:"piece length"` PieceLength int64 `bencode:"piece length"`
Pieces []byte `bencode:"pieces"` Pieces []byte `bencode:"pieces"`
Name string `bencode:"name"` Name string `bencode:"name"`
Length int64 `bencode:"length,omitempty"` Length int64 `bencode:"length,omitempty"`
Private *bool `bencode:"private,omitempty"` Private *bool `bencode:"private,omitempty"`
Source string `bencode:"source,omitempty"` // TODO: Document this field.
Files []FileInfo `bencode:"files,omitempty"` Source string `bencode:"source,omitempty"`
Files []FileInfo `bencode:"files,omitempty"`
} }
// This is a helper that sets Files and Pieces from a root path and its // This is a helper that sets Files and Pieces from a root path and its