mirror of
https://github.com/veggiedefender/torrent-client.git
synced 2025-03-19 05:57:50 +02:00
24 lines
304 B
Go
24 lines
304 B
Go
package main
|
|
|
|
import (
|
|
"log"
|
|
"os"
|
|
|
|
"github.com/veggiedefender/torrent-client/torrentfile"
|
|
)
|
|
|
|
func main() {
|
|
inPath := os.Args[1]
|
|
outPath := os.Args[2]
|
|
|
|
tf, err := torrentfile.Open(inPath)
|
|
if err != nil {
|
|
log.Fatal(err)
|
|
}
|
|
|
|
err = tf.DownloadToFile(outPath)
|
|
if err != nil {
|
|
log.Fatal(err)
|
|
}
|
|
}
|