aboutsummaryrefslogtreecommitdiff
path: root/flag.go
diff options
context:
space:
mode:
Diffstat (limited to 'flag.go')
-rw-r--r--flag.go2
1 files changed, 1 insertions, 1 deletions
diff --git a/flag.go b/flag.go
index 0af452d..9a16e7a 100644
--- a/flag.go
+++ b/flag.go
@@ -379,7 +379,7 @@ func (f *FlagSet) AddFlag(flag *Flag) {
c := flag.Shorthand[0]
old, alreadythere := f.shorthands[c]
if alreadythere {
- fmt.Fprintf(f.out(), "%s shorthand reused: %q for %s already used for %s\n", f.name, c, name, old.Name)
+ fmt.Fprintf(f.out(), "%s shorthand reused: %q for %s already used for %s\n", f.name, c, flag.Name, old.Name)
panic("shorthand redefinition")
}
f.shorthands[c] = flag