@@ -70,7 +70,7 @@ func (cli *cliNotifications) NewCommand() *cobra.Command {
70
70
return fmt .Errorf ("loading api client: %w" , err )
71
71
}
72
72
73
- return require . Notifications ( cfg )
73
+ return nil
74
74
},
75
75
}
76
76
@@ -176,7 +176,7 @@ func (cli *cliNotifications) newListCmd() *cobra.Command {
176
176
if err != nil {
177
177
return fmt .Errorf ("failed to serialize notification configuration: %w" , err )
178
178
}
179
- fmt .Printf ( "%s" , string (x ))
179
+ fmt .Fprint ( os . Stdout , string (x ))
180
180
} else if cfg .Cscli .Output == "raw" {
181
181
csvwriter := csv .NewWriter (os .Stdout )
182
182
err := csvwriter .Write ([]string {"Name" , "Type" , "Profile name" })
@@ -223,19 +223,19 @@ func (cli *cliNotifications) newInspectCmd() *cobra.Command {
223
223
return fmt .Errorf ("plugin '%s' does not exist or is not active" , args [0 ])
224
224
}
225
225
if cfg .Cscli .Output == "human" || cfg .Cscli .Output == "raw" {
226
- fmt .Printf ( " - %15s: %15s\n " , "Type" , ncfg .Config .Type )
227
- fmt .Printf ( " - %15s: %15s\n " , "Name" , ncfg .Config .Name )
228
- fmt .Printf ( " - %15s: %15s\n " , "Timeout" , ncfg .Config .TimeOut )
229
- fmt .Printf ( " - %15s: %15s\n " , "Format" , ncfg .Config .Format )
226
+ fmt .Fprintf ( os . Stdout , " - %15s: %15s\n " , "Type" , ncfg .Config .Type )
227
+ fmt .Fprintf ( os . Stdout , " - %15s: %15s\n " , "Name" , ncfg .Config .Name )
228
+ fmt .Fprintf ( os . Stdout , " - %15s: %15s\n " , "Timeout" , ncfg .Config .TimeOut )
229
+ fmt .Fprintf ( os . Stdout , " - %15s: %15s\n " , "Format" , ncfg .Config .Format )
230
230
for k , v := range ncfg .Config .Config {
231
- fmt .Printf ( " - %15s: %15v\n " , k , v )
231
+ fmt .Fprintf ( os . Stdout , " - %15s: %15v\n " , k , v )
232
232
}
233
233
} else if cfg .Cscli .Output == "json" {
234
234
x , err := json .MarshalIndent (cfg , "" , " " )
235
235
if err != nil {
236
236
return fmt .Errorf ("failed to serialize notification configuration: %w" , err )
237
237
}
238
- fmt .Printf ( "%s" , string (x ))
238
+ fmt .Fprint ( os . Stdout , string (x ))
239
239
}
240
240
241
241
return nil
0 commit comments