Recognize -version
This commit is contained in:
parent
3f803cb75c
commit
3a8606c117
2
main.go
2
main.go
|
@ -91,7 +91,7 @@ func wrappedMain() int {
|
||||||
// just show the version.
|
// just show the version.
|
||||||
args := os.Args[1:]
|
args := os.Args[1:]
|
||||||
for _, arg := range args {
|
for _, arg := range args {
|
||||||
if arg == "-v" || arg == "--version" {
|
if arg == "-v" || arg == "-version" || arg == "--version" {
|
||||||
newArgs := make([]string, len(args)+1)
|
newArgs := make([]string, len(args)+1)
|
||||||
newArgs[0] = "version"
|
newArgs[0] = "version"
|
||||||
copy(newArgs[1:], args)
|
copy(newArgs[1:], args)
|
||||||
|
|
Loading…
Reference in New Issue