From ba8e3c98e7acec611d11b61c23e4f1671f2b04fe Mon Sep 17 00:00:00 2001 From: Anthony Lam Date: Wed, 8 Nov 2017 22:00:29 -0800 Subject: [PATCH] Add -V and -h for flag parsing --- cmd.go | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/cmd.go b/cmd.go index 1ad005f7..64a16474 100644 --- a/cmd.go +++ b/cmd.go @@ -142,10 +142,14 @@ func parser() (op string, options []string, packages []string, changedConfig boo } if arg[0] == '-' && arg[1] != '-' { switch arg { + case "-V": + arg = "--version" + case "-h": + arg = "--help" default: op = arg + continue } - continue } if arg[0] == '-' && arg[1] == '-' {