From 401c44eddd99b49d134c65931d3a61c2439e7047 Mon Sep 17 00:00:00 2001 From: Aleksandr Mogylchenko Date: Fri, 8 Jul 2016 22:09:00 +0200 Subject: [PATCH] Fix camget/cammount so they accept --help Fixes #671 Change-Id: I515f592660772f25993008071c36ed46f8a54920 --- cmd/camget/camget.go | 4 ++++ cmd/cammount/cammount.go | 4 ++++ 2 files changed, 8 insertions(+) diff --git a/cmd/camget/camget.go b/cmd/camget/camget.go index f7a88abee..9d7f1ac43 100644 --- a/cmd/camget/camget.go +++ b/cmd/camget/camget.go @@ -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 diff --git a/cmd/cammount/cammount.go b/cmd/cammount/cammount.go index 23efdd9c6..a89775df1 100644 --- a/cmd/cammount/cammount.go +++ b/cmd/cammount/cammount.go @@ -70,6 +70,10 @@ func main() { return } + if *cmdmain.FlagHelp { + usage() + } + narg := flag.NArg() if narg > 2 { usage()