@@ -69,7 +69,7 @@ func (c commander) run(flagSet *flag.FlagSet, cmdName string, usage *template.Te
6969 }
7070 }
7171 if ! flagSet .Parsed () {
72- flagSet .Parse (args )
72+ _ = flagSet .Parse (args )
7373 }
7474
7575 // Print usage if the command is "help".
@@ -82,21 +82,21 @@ func (c commander) run(flagSet *flag.FlagSet, cmdName string, usage *template.Te
8282 for _ , cmd_ := range c {
8383 cmd := cmd_
8484 cmd .FlagSet .Usage = func () {
85- fmt .Fprintln (commandLine .Output (), "Usage:" )
86- fmt .Fprintln (commandLine .Output ())
87- fmt .Fprintf (commandLine .Output (), " %s [options] %s" , cmdName , cmd .FlagSet .Name ())
85+ _ , _ = fmt .Fprintln (commandLine .Output (), "Usage:" )
86+ _ , _ = fmt .Fprintln (commandLine .Output ())
87+ _ , _ = fmt .Fprintf (commandLine .Output (), " %s [options] %s" , cmdName , cmd .FlagSet .Name ())
8888 if hasFlags (cmd .FlagSet ) {
89- fmt .Fprint (commandLine .Output (), " [command options]" )
89+ _ , _ = fmt .Fprint (commandLine .Output (), " [command options]" )
9090 }
91- fmt .Fprintln (commandLine .Output ())
91+ _ , _ = fmt .Fprintln (commandLine .Output ())
9292 if cmd .LongDescription != "" {
93- fmt .Fprintln (commandLine .Output ())
94- fmt .Fprintln (commandLine .Output (), cmd .LongDescription )
95- fmt .Fprintln (commandLine .Output ())
93+ _ , _ = fmt .Fprintln (commandLine .Output ())
94+ _ , _ = fmt .Fprintln (commandLine .Output (), cmd .LongDescription )
95+ _ , _ = fmt .Fprintln (commandLine .Output ())
9696 }
9797 if hasFlags (cmd .FlagSet ) {
98- fmt .Fprintln (commandLine .Output (), "The command options are:" )
99- fmt .Fprintln (commandLine .Output ())
98+ _ , _ = fmt .Fprintln (commandLine .Output (), "The command options are:" )
99+ _ , _ = fmt .Fprintln (commandLine .Output ())
100100 cmd .FlagSet .PrintDefaults ()
101101 }
102102 }
0 commit comments