cmd/torrent-pick/main.go | 11 ++++------- diff --git a/cmd/torrent-pick/main.go b/cmd/torrent-pick/main.go index 3b64152aba1a1f4a4f2e5827db0726ab21b3ac16..6a6a90e18fbfe5cf3942db3efa51eaa2177a93f0 100644 --- a/cmd/torrent-pick/main.go +++ b/cmd/torrent-pick/main.go @@ -2,18 +2,17 @@ // Downloads torrents from the command-line. package main import ( + "bufio" "fmt" + "io" + "io/ioutil" "log" "net" "net/http" _ "net/http/pprof" "os" - "io" - "io/ioutil" "strings" "time" - "bufio" - _ "github.com/anacrolix/envpprof" "github.com/dustin/go-humanize" @@ -126,7 +125,6 @@ client.WriteStatus(w) }) defer client.Close() - dstName := dstFileName(rootGroup.Pick) f, err := os.Create(dstName) @@ -165,7 +163,7 @@ go func() { <-t.GotInfo() files := t.Files() for _, file := range files { - if file.Path() == rootGroup.Pick { + if file.Path() == rootGroup.Pick { log.Printf("Downloading file: %s", file.Path()) @@ -177,7 +175,6 @@ } } }() } - ticker := time.NewTicker(time.Second) waitDone: