Skip to content
This repository has been archived by the owner on Feb 21, 2023. It is now read-only.

Commit

Permalink
Add support for "-version" command-line flag
Browse files Browse the repository at this point in the history
  • Loading branch information
dbarbuzzi committed May 22, 2018
1 parent a1a6074 commit 7e3e7c5
Showing 1 changed file with 6 additions and 0 deletions.
6 changes: 6 additions & 0 deletions tvd.go
Original file line number Diff line number Diff line change
Expand Up @@ -452,8 +452,14 @@ func parseFlags() (Config, error) {
prefix := flag.String("prefix", "", "optional prefix for the output file's name")
folder := flag.String("folder", "", "target folder for output file (default: current dir)")
workers := flag.Int("workers", 0, "number of concurrent downloads(default: 4) ")
version := flag.Bool("version", false, "show version and exit")
flag.Parse()

if *version {
fmt.Printf("tvd %s", Version)
os.Exit(0)
}

if *client != "" {
config.ClientID = *client
}
Expand Down

0 comments on commit 7e3e7c5

Please sign in to comment.