Skip to content

Commit b85eb9e

Browse files
authored
Merge pull request #460 from pterjan/patch-2
Fix for Go 1.24
2 parents 6fcfbc9 + 00153c6 commit b85eb9e

File tree

1 file changed

+3
-3
lines changed

1 file changed

+3
-3
lines changed

flag.go

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -388,7 +388,7 @@ func (f *FlagSet) ShorthandLookup(name string) *Flag {
388388
}
389389
if len(name) > 1 {
390390
msg := fmt.Sprintf("can not look up shorthand which is more than one ASCII character: %q", name)
391-
fmt.Fprintf(f.Output(), msg)
391+
fmt.Fprint(f.Output(), msg)
392392
panic(msg)
393393
}
394394
c := name[0]
@@ -893,7 +893,7 @@ func (f *FlagSet) AddFlag(flag *Flag) {
893893
}
894894
if len(flag.Shorthand) > 1 {
895895
msg := fmt.Sprintf("%q shorthand is more than one ASCII character", flag.Shorthand)
896-
fmt.Fprintf(f.Output(), msg)
896+
fmt.Fprint(f.Output(), msg)
897897
panic(msg)
898898
}
899899
if f.shorthands == nil {
@@ -903,7 +903,7 @@ func (f *FlagSet) AddFlag(flag *Flag) {
903903
used, alreadyThere := f.shorthands[c]
904904
if alreadyThere {
905905
msg := fmt.Sprintf("unable to redefine %q shorthand in %q flagset: it's already used for %q flag", c, f.name, used.Name)
906-
fmt.Fprintf(f.Output(), msg)
906+
fmt.Fprint(f.Output(), msg)
907907
panic(msg)
908908
}
909909
f.shorthands[c] = flag

0 commit comments

Comments
 (0)