(cmd *cobra.Command)
| 227 | } |
| 228 | |
| 229 | func commandOutput(cmd *cobra.Command) *output.Renderer { |
| 230 | if cmd == nil { |
| 231 | return output.New(nil, nil, output.FormatText) |
| 232 | } |
| 233 | |
| 234 | return output.New(cmd.OutOrStdout(), cmd.ErrOrStderr(), commandOutputFormat(cmd)) |
| 235 | } |
| 236 | |
| 237 | func commandOutputFormat(cmd *cobra.Command) output.Format { |
| 238 | format, err := commandOutputFormatE(cmd) |