Versions in this module Expand all Collapse all v1 v1.0.1 Jul 22, 2017 Changes in this version + var ErrInvalidTorrentFile = errors.New("torrent_file_invalid") + func DecodeInfohash(r io.Reader) (hash string, err error) + type FileInfo struct + Length uint64 + Path FilePath + Sum []byte + type FilePath []string + func (f FilePath) FilePath() string + func (f FilePath) Open(base string) (*os.File, error) + type Info struct + Files []FileInfo + Length uint64 + Path string + PieceLength uint32 + Pieces []byte + Private *int64 + Sum []byte + func (i Info) GetFiles() (infos []FileInfo) + func (i Info) NumPieces() uint32 + type TorrentFile struct + Announce string + AnnounceList [][]string + Comment []byte + Created uint64 + CreatedBy []byte + Encoding []byte + Info Info + func (tf *TorrentFile) Decode(r io.Reader) (err error) + func (tf *TorrentFile) Encode(w io.Writer) (err error) + func (tf *TorrentFile) GetAllAnnounceURLS() (l []string) + func (tf *TorrentFile) IsPrivate() bool + func (tf *TorrentFile) IsSingleFile() bool + func (tf *TorrentFile) TorrentName() string + func (tf *TorrentFile) TotalSize() uint64