@@ -69,7 +69,7 @@ func (c commander) run(flagSet *flag.FlagSet, cmdName string, usage *template.Te
69
69
}
70
70
}
71
71
if ! flagSet .Parsed () {
72
- flagSet .Parse (args )
72
+ _ = flagSet .Parse (args )
73
73
}
74
74
75
75
// Print usage if the command is "help".
@@ -82,21 +82,21 @@ func (c commander) run(flagSet *flag.FlagSet, cmdName string, usage *template.Te
82
82
for _ , cmd_ := range c {
83
83
cmd := cmd_
84
84
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 ())
88
88
if hasFlags (cmd .FlagSet ) {
89
- fmt .Fprint (commandLine .Output (), " [command options]" )
89
+ _ , _ = fmt .Fprint (commandLine .Output (), " [command options]" )
90
90
}
91
- fmt .Fprintln (commandLine .Output ())
91
+ _ , _ = fmt .Fprintln (commandLine .Output ())
92
92
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 ())
96
96
}
97
97
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 ())
100
100
cmd .FlagSet .PrintDefaults ()
101
101
}
102
102
}
0 commit comments