Skip to content

Commit

Permalink
Add upload and download only switches
Browse files Browse the repository at this point in the history
  • Loading branch information
mattmathis committed Sep 27, 2019
1 parent bcd7395 commit 49631b6
Showing 1 changed file with 8 additions and 0 deletions.
8 changes: 8 additions & 0 deletions cmd/ndt7-client/main.go
Original file line number Diff line number Diff line change
Expand Up @@ -87,6 +87,8 @@ const (
)

var (
flagUpload = flag.Bool("upload", false, "run only an upload test")
flagDownload = flag.Bool("download", false, "run only a download test")
flagBatch = flag.Bool("batch", false, "emit JSON events on stdout")
flagNoVerify = flag.Bool("no-verify", false, "skip TLS certificate verification")
flagHostname = flag.String("hostname", "", "optional ndt7 server hostname")
Expand Down Expand Up @@ -169,5 +171,11 @@ func main() {
} else {
r.emitter = emitter.NewInteractive()
}
if *flagUpload {
osExit(r.runUpload(ctx))
}
if *flagDownload {
osExit(r.runDownload(ctx))
}
osExit(r.runDownload(ctx) + r.runUpload(ctx))
}

0 comments on commit 49631b6

Please sign in to comment.