Fix camget/cammount so they accept --help

Fixes #671

Change-Id: I515f592660772f25993008071c36ed46f8a54920
This commit is contained in:
Aleksandr Mogylchenko 2016-07-08 22:09:00 +02:00
parent 9beb003f30
commit 401c44eddd
2 changed files with 8 additions and 0 deletions

View File

@ -58,6 +58,10 @@ func main() {
client.AddFlags()
flag.Parse()
if *cmdmain.FlagHelp {
flag.PrintDefaults()
}
if *flagVersion {
fmt.Fprintf(os.Stderr, "camget version: %s\n", buildinfo.Version())
return

View File

@ -70,6 +70,10 @@ func main() {
return
}
if *cmdmain.FlagHelp {
usage()
}
narg := flag.NArg()
if narg > 2 {
usage()