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:
committed by
GitHub
parent
4369957cb4
commit
8384a5683c
+1
-1
@@ -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))
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user