Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Fail immediately if there's a getopt parse error (#30)
The getopt code doesn't appear to fully respect ErrorHandling so unrecognized flags result in Usage being displayed but not an Exit(). https://github.com/rsc/getopt/blob/20be20937449f18bb9967c10d732849fb4401e63/getopt.go#L274-L277 In our application, this was causing Usage to be displayed twice. To fix this, we catch the lower-level Parse() error and bail immediately.
- Loading branch information