1
0
mirror of https://github.com/veggiedefender/torrent-client.git synced 2025-03-19 14:07:49 +02:00
torrent-client/main.go

24 lines
304 B
Go
Raw Permalink Normal View History

2019-12-21 23:14:33 -05:00
package main
import (
"log"
"os"
2019-12-29 14:02:50 -05:00
"github.com/veggiedefender/torrent-client/torrentfile"
2019-12-21 23:14:33 -05:00
)
func main() {
2019-12-26 21:53:11 -05:00
inPath := os.Args[1]
outPath := os.Args[2]
2020-01-02 12:17:45 -05:00
tf, err := torrentfile.Open(inPath)
2019-12-26 21:53:11 -05:00
if err != nil {
log.Fatal(err)
}
2020-01-02 12:17:45 -05:00
err = tf.DownloadToFile(outPath)
if err != nil {
log.Fatal(err)
}
2019-12-21 23:14:33 -05:00
}