Skip to content

Commit

Permalink
start the program
Browse files Browse the repository at this point in the history
  • Loading branch information
baarayy committed May 17, 2024
1 parent 010a628 commit e0dafb6
Showing 1 changed file with 14 additions and 4 deletions.
18 changes: 14 additions & 4 deletions main.go
Original file line number Diff line number Diff line change
@@ -1,12 +1,22 @@
package main

import "os"
import (
"log"
"magnetflow/torrentfile"
"os"
)

func main() {
file, err := os.Open(os.Args[1])
inPath, outPath := os.Args[1], os.Args[2]
tf, err := torrentfile.Open(inPath)
if err != nil {
panic(err)
log.Fatal(err)
}

err = tf.DownloadToFile(outPath)

if err != nil {
log.Fatal(err)
}
defer file.Close()

}

0 comments on commit e0dafb6

Please sign in to comment.