aboutsummaryrefslogtreecommitdiff
path: root/flag.go
diff options
context:
space:
mode:
Diffstat (limited to 'flag.go')
-rw-r--r--flag.go4
1 files changed, 3 insertions, 1 deletions
diff --git a/flag.go b/flag.go
index 6ea0c48..801a444 100644
--- a/flag.go
+++ b/flag.go
@@ -319,7 +319,9 @@ func (f *FlagSet) Lookup(name string) *Flag {
return f.lookup(f.normalizeFlagName(name))
}
-// ShorthandLookup returns the Flag structure of the short handed flag, returning nil if none exists.
+// ShorthandLookup returns the Flag structure of the short handed flag,
+// returning nil if none exists.
+// It panics, if len(name) > 1.
func (f *FlagSet) ShorthandLookup(name string) *Flag {
if name == "" {
return nil