MCPcopy Create free account
hub / github.com/OctopusDeploy/cli / printTaskWithCustomFormat

Function printTaskWithCustomFormat

pkg/cmd/task/wait/wait.go:324–337  ·  view source on GitHub ↗
(opts *WaitOptions, t *tasks.Task, tableHeaderPrinted *bool)

Source from the content-addressed store, hash-verified

322}
323
324func 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}

Callers 1

WaitRunFunction · 0.85

Calls 2

PrintResourceFunction · 0.92
getTaskMappersFunction · 0.85

Tested by

no test coverage detected