diff options
Diffstat (limited to 'flag.go')
| -rw-r--r-- | flag.go | 4 |
1 files changed, 3 insertions, 1 deletions
@@ -327,7 +327,9 @@ func (f *FlagSet) ShorthandLookup(name string) *Flag { return nil } if len(name) > 1 { - panic("can't look up for a shorthand with name more than one character") + msg := fmt.Sprintf("can not look up shorthand which is more than one ASCII character: %q", name) + fmt.Fprintf(f.out(), msg) + panic(msg) } c := name[0] return f.shorthands[c] |
