MCPcopy Create free account
hub / github.com/algolia/cli / HasStructuredOutput

Method HasStructuredOutput

pkg/cmdutil/print_flags.go:64–66  ·  view source on GitHub ↗

HasStructuredOutput returns true when the command is configured to emit a machine-readable format, either through an explicit flag or a default output.

()

Source from the content-addressed store, hash-verified

62// HasStructuredOutput returns true when the command is configured to emit a
63// machine-readable format, either through an explicit flag or a default output.
64func (f *PrintFlags) HasStructuredOutput() bool {
65 return f != nil && f.OutputFormat != nil && strings.TrimSpace(*f.OutputFormat) != ""
66}
67
68func (f *PrintFlags) ToPrinter() (printers.Printer, error) {
69 outputFormat := ""

Callers 7

PrintRunSummaryFunction · 0.80
runDeleteCmdFunction · 0.80
runImportCmdFunction · 0.80
runImportCmdFunction · 0.80
runListCmdFunction · 0.80
runBrowseCmdFunction · 0.80
runDeleteCmdFunction · 0.80

Calls

no outgoing calls

Tested by

no test coverage detected