1
0
mirror of https://github.com/golang/go synced 2024-11-22 19:24:59 -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:
Brendan O'Dea 2009-04-26 18:36:17 -07:00
parent bf53e16f6d
commit 68b881791f

View File

@ -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);