4 "bitbucket.org/anacrolix/go.torrent"
6 metainfo "github.com/nsf/libtorgo/torrent"
12 downloadDir = flag.String("downloadDir", "", "directory to store download torrent data")
20 client := torrent.NewClient(*downloadDir)
21 for _, arg := range flag.Args() {
22 metaInfo, err := metainfo.LoadFromFile(arg)
26 err = client.AddTorrent(metaInfo)
30 err = client.AddPeers(torrent.BytesInfoHash(metaInfo.InfoHash), []torrent.Peer{{
31 IP: net.IPv4(127, 0, 0, 1),