mirror of
https://github.com/golang/go
synced 2024-11-22 14:44:50 -07:00
flags.Usage() calls fmt.Fprintf() with incorrect args
R=r APPROVED=r DELTA=2 (0 added, 0 deleted, 2 changed) OCL=27777 CL=27876
This commit is contained in:
parent
bf53e16f6d
commit
68b881791f
@ -264,9 +264,9 @@ func PrintDefaults() {
|
||||
// then calls sys.Exit(1).
|
||||
func Usage() {
|
||||
if len(sys.Args) > 0 {
|
||||
fmt.Fprintf(os.Stderr, "Usage of ", sys.Args[0], ": \n");
|
||||
fmt.Fprintln(os.Stderr, "Usage of", sys.Args[0] + ":");
|
||||
} else {
|
||||
fmt.Fprintf(os.Stderr, "Usage: \n");
|
||||
fmt.Fprintln(os.Stderr, "Usage:");
|
||||
}
|
||||
PrintDefaults();
|
||||
sys.Exit(1);
|
||||
|
Loading…
Reference in New Issue
Block a user