Closed suntong closed 7 years ago
Hi 仕晋,
Found a very strange error, please take a look at https://gist.github.com/suntong/fdd74049660315e54fa72ecb5fd2f04e
If I run it with go run /tmp/dump.go, the help output is OK.
go run /tmp/dump.go
However, when I run it with go run /tmp/dump.go -i or even go run /tmp/dump.go -i aaa, it still prints the help output instead of invoking the actual command.
go run /tmp/dump.go -i
go run /tmp/dump.go -i aaa
Why is that? Thx.
I tried to change "NumArg: cli.AtLeast(1)" to "NumOption: cli.AtLeast(1)", but the behavior is still the same.
NumArg: cli.AtLeast(1)
NumOption: cli.AtLeast(1)
yep, should be NumOption: cli.AtLeast(1). Closing the invalid report.
Hi 仕晋,
Found a very strange error, please take a look at https://gist.github.com/suntong/fdd74049660315e54fa72ecb5fd2f04e
If I run it with
go run /tmp/dump.go
, the help output is OK.However, when I run it with
go run /tmp/dump.go -i
or evengo run /tmp/dump.go -i aaa
, it still prints the help output instead of invoking the actual command.Why is that? Thx.