Use constant format strings with Printf-like functions (#1013)

Recent versions of Go object to the use of non-constant variables a
format strings. This commit fixes errors like this:

cli.go:26:47: non-constant format string in call to fmt.Fprintf

Signed-off-by: W. Michael Petullo <mike@flyn.org>
This commit is contained in:
W. Michael Petullo
2026-01-03 19:42:58 -06:00
committed by GitHub
parent 4369957cb4
commit 8384a5683c
2 changed files with 3 additions and 3 deletions
+1 -1
View File
@@ -22,7 +22,7 @@ type Program struct {
}
func (p *Program) Execute() {
flag.Usage = func() { fmt.Fprintf(os.Stderr, p.Usage) }
flag.Usage = func() { fmt.Fprint(os.Stderr, p.Usage) }
flag.Parse()
os.Exit(p.main(flag.Args(), os.Stdin, os.Stdout, os.Stderr))
}