@@ -61,25 +61,22 @@ var collectCmd = &cobra.Command{
61
61
Run : func (cmd * cobra.Command , args []string ) {
62
62
runtimeConfig := & CollectionParams {}
63
63
err := populateParams (cmd , runtimeConfig )
64
- if err == nil {
65
- requestedDuration , err := time .ParseDuration (runtimeConfig .Duration )
66
- if requestedDuration .Nanoseconds () < 0 {
67
- log .Panicf ("Requested duration must be positive" )
68
- }
69
- utils .IfErrorExitOrPanic (err )
70
-
71
- collectionRunner := runner .NewCollectorRunner (runtimeConfig .CollectorNames )
72
- collectionRunner .Run (
73
- runtimeConfig .KubeConfig ,
74
- runtimeConfig .OutputFile ,
75
- requestedDuration ,
76
- runtimeConfig .PollInterval ,
77
- runtimeConfig .DevInfoAnnouceInterval ,
78
- runtimeConfig .PTPInterface ,
79
- runtimeConfig .UseAnalyserJSON ,
80
- )
64
+ utils .IfErrorExitOrPanic (err )
65
+ requestedDuration , err := time .ParseDuration (runtimeConfig .Duration )
66
+ utils .IfErrorExitOrPanic (err )
67
+ if requestedDuration .Nanoseconds () < 0 {
68
+ log .Panicf ("Requested duration must be positive" )
81
69
}
82
-
70
+ collectionRunner := runner .NewCollectorRunner (runtimeConfig .CollectorNames )
71
+ collectionRunner .Run (
72
+ runtimeConfig .KubeConfig ,
73
+ runtimeConfig .OutputFile ,
74
+ requestedDuration ,
75
+ runtimeConfig .PollInterval ,
76
+ runtimeConfig .DevInfoAnnouceInterval ,
77
+ runtimeConfig .PTPInterface ,
78
+ runtimeConfig .UseAnalyserJSON ,
79
+ )
83
80
},
84
81
}
85
82
@@ -127,7 +124,6 @@ func init() { //nolint:funlen // Allow this to get a little long
127
124
128
125
defaultCollectorNames := make ([]string , 0 )
129
126
defaultCollectorNames = append (defaultCollectorNames , runner .All )
130
-
131
127
collectCmd .Flags ().StringSliceVarP (
132
128
& collectorNames ,
133
129
"collector" ,
0 commit comments