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

Function PrintRunSummary

pkg/cmdutil/result_output.go:11–22  ·  view source on GitHub ↗

PrintRunSummary prints a structured summary when an output format is requested, otherwise it falls back to a human-readable line.

(
	ios *iostreams.IOStreams,
	printFlags *PrintFlags,
	summary interface{},
	human string,
)

Source from the content-addressed store, hash-verified

9// PrintRunSummary prints a structured summary when an output format is
10// requested, otherwise it falls back to a human-readable line.
11func PrintRunSummary(
12 ios *iostreams.IOStreams,
13 printFlags *PrintFlags,
14 summary interface{},
15 human string,
16) error {
17 if printFlags != nil && printFlags.HasStructuredOutput() {
18 return printFlags.Print(ios, summary)
19 }
20 _, err := fmt.Fprintln(ios.Out, human)
21 return err
22}

Callers 15

runDeleteCmdFunction · 0.92
runUpdateCmdFunction · 0.92
runOperationsCmdFunction · 0.92
runImportCmdFunction · 0.92
runImportCmdFunction · 0.92
changePlanFunction · 0.92
printDryRunSummaryFunction · 0.92
runImportCmdFunction · 0.92
runDeleteCmdFunction · 0.92
runReindexCmdFunction · 0.92
runPauseCmdFunction · 0.92
runTestCmdFunction · 0.92

Calls 2

HasStructuredOutputMethod · 0.80
PrintMethod · 0.65

Tested by

no test coverage detected