cmd/torrent: Add -upload flag

This commit is contained in:
Matt Joiner 2014-12-01 03:29:56 -06:00
parent b1da5d0656
commit d430cf9ec9
1 changed files with 2 additions and 0 deletions

View File

@ -24,6 +24,7 @@ var (
listenAddr = flag.String("listenAddr", ":50007", "incoming connection address")
disableTrackers = flag.Bool("disableTrackers", false, "disable trackers")
seed = flag.Bool("seed", false, "seed after downloading")
upload = flag.Bool("upload", true, "upload data to peers")
)
func main() {
@ -36,6 +37,7 @@ func main() {
DataDir: *downloadDir,
DisableTrackers: *disableTrackers,
ListenAddr: *listenAddr,
NoUpload: !*upload,
})
if err != nil {
log.Fatalf("error creating client: %s", err)