aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorTomas Aschan <[email protected]>2026-01-10 16:15:13 +0100
committerGitHub <[email protected]>2026-01-10 16:15:13 +0100
commitb85eb9e15911a41cd7c05d955503542e9befadf4 (patch)
treea56ccfe618e3f19c894dc87950272f152d7f17cd
parent6fcfbc9910e1af538fde31db820be7d1bec231e4 (diff)
parent00153c6ac5d57e570f8378dedf321f34e373e4c3 (diff)
Merge pull request #460 from pterjan/patch-2HEADmaster
Fix for Go 1.24
-rw-r--r--flag.go6
1 files changed, 3 insertions, 3 deletions
diff --git a/flag.go b/flag.go
index e9ca46e..1cb047a 100644
--- a/flag.go
+++ b/flag.go
@@ -388,7 +388,7 @@ func (f *FlagSet) ShorthandLookup(name string) *Flag {
}
if len(name) > 1 {
msg := fmt.Sprintf("can not look up shorthand which is more than one ASCII character: %q", name)
- fmt.Fprintf(f.Output(), msg)
+ fmt.Fprint(f.Output(), msg)
panic(msg)
}
c := name[0]
@@ -893,7 +893,7 @@ func (f *FlagSet) AddFlag(flag *Flag) {
}
if len(flag.Shorthand) > 1 {
msg := fmt.Sprintf("%q shorthand is more than one ASCII character", flag.Shorthand)
- fmt.Fprintf(f.Output(), msg)
+ fmt.Fprint(f.Output(), msg)
panic(msg)
}
if f.shorthands == nil {
@@ -903,7 +903,7 @@ func (f *FlagSet) AddFlag(flag *Flag) {
used, alreadyThere := f.shorthands[c]
if alreadyThere {
msg := fmt.Sprintf("unable to redefine %q shorthand in %q flagset: it's already used for %q flag", c, f.name, used.Name)
- fmt.Fprintf(f.Output(), msg)
+ fmt.Fprint(f.Output(), msg)
panic(msg)
}
f.shorthands[c] = flag