File tree Expand file tree Collapse file tree 1 file changed +4
-6
lines changed Expand file tree Collapse file tree 1 file changed +4
-6
lines changed Original file line number Diff line number Diff line change @@ -150,14 +150,14 @@ func (v *filterValue) Type() string {
150
150
}
151
151
152
152
func main () {
153
- err := mainImplementation ()
153
+ err := mainImplementation (os . Args [ 1 :] )
154
154
if err != nil {
155
155
fmt .Fprintf (os .Stderr , "error: %s\n " , err )
156
156
os .Exit (1 )
157
157
}
158
158
}
159
159
160
- func mainImplementation () error {
160
+ func mainImplementation (args [] string ) error {
161
161
var nameStyle sizes.NameStyle = sizes .NameStyleFull
162
162
var cpuprofile string
163
163
var jsonOutput bool
@@ -250,7 +250,7 @@ func mainImplementation() error {
250
250
251
251
flags .SortFlags = false
252
252
253
- err = flags .Parse (os . Args [ 1 :] )
253
+ err = flags .Parse (args )
254
254
if err != nil {
255
255
if err == pflag .ErrHelp {
256
256
return nil
@@ -280,9 +280,7 @@ func mainImplementation() error {
280
280
return nil
281
281
}
282
282
283
- args := flags .Args ()
284
-
285
- if len (args ) != 0 {
283
+ if len (flags .Args ()) != 0 {
286
284
return errors .New ("excess arguments" )
287
285
}
288
286
You can’t perform that action at this time.
0 commit comments