Add support for setting a function to handle flag parsing errors.

The default pflag error is to only print the bad flag. This enables an application
to include a usage message or other details about the error.

Signed-off-by: Daniel Nephin <dnephin@gmail.com>
This commit is contained in:
Daniel Nephin
2016-05-25 14:27:02 -07:00
parent 9c28e4bbd7
commit 67feb8173c
3 changed files with 55 additions and 7 deletions

View File

@ -101,4 +101,3 @@ linkHandler := func(name string) string {
return "/commands/" + strings.ToLower(base) + "/"
}
```