(opts *WaitOptions, t *tasks.Task, tableHeaderPrinted *bool)
| 322 | } |
| 323 | |
| 324 | func printTaskWithCustomFormat(opts *WaitOptions, t *tasks.Task, tableHeaderPrinted *bool) { |
| 325 | outputFormat, _ := opts.Command.Flags().GetString(constants.FlagOutputFormat) |
| 326 | |
| 327 | if outputFormat == constants.OutputFormatJson { |
| 328 | _ = output.PrintResource(t, opts.Command, getTaskMappers()) |
| 329 | } else if outputFormat == constants.OutputFormatTable { |
| 330 | mappers := getTaskMappers() |
| 331 | if *tableHeaderPrinted { |
| 332 | mappers.Table.Header = nil // Don't print header for subsequent updates |
| 333 | } |
| 334 | _ = output.PrintResource(t, opts.Command, mappers) |
| 335 | *tableHeaderPrinted = true |
| 336 | } |
| 337 | } |
no test coverage detected