Skip to content

Commit 1f79c8b

Browse files
author
Matthew Fisher
committed
fix(deisctl): use docopt's native version parser
1 parent fd18f5b commit 1f79c8b

1 file changed

Lines changed: 1 addition & 6 deletions

File tree

deisctl.go

Lines changed: 1 addition & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -70,13 +70,8 @@ Options:
7070
--tunnel=<host> establish an SSH tunnel for communication with fleet and etcd [default: ]
7171
--request-timeout=<secs> amount of time to allow a single request before considering it failed. [default: 3.0]
7272
`
73-
// special handling for version
74-
if len(os.Args) == 2 && os.Args[1] == "--version" {
75-
fmt.Println(Version)
76-
os.Exit(0)
77-
}
7873
// parse command-line arguments
79-
args, err := docopt.Parse(usage, nil, true, "", true)
74+
args, err := docopt.Parse(usage, nil, true, Version, true)
8075
if err != nil {
8176
exit(err, 2)
8277
}

0 commit comments

Comments
 (0)