Add -V and -h for flag parsing

This commit is contained in:
Anthony Lam 2017-11-08 22:00:29 -08:00
parent 97bb7d0a9c
commit ba8e3c98e7

6
cmd.go
View file

@ -142,11 +142,15 @@ 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
}
}
if arg[0] == '-' && arg[1] == '-' {
changedConfig = true