MCPcopy Create free account
hub / github.com/github/gh-aw / printChecksJSON

Function printChecksJSON

pkg/cli/checks_command.go:386–393  ·  view source on GitHub ↗

printChecksJSON prints the result as JSON to stdout.

(result *ChecksResult)

Source from the content-addressed store, hash-verified

384
385// printChecksJSON prints the result as JSON to stdout.
386func printChecksJSON(result *ChecksResult) error {
387 enc := json.NewEncoder(os.Stdout)
388 enc.SetIndent("", " ")
389 if err := enc.Encode(result); err != nil {
390 return fmt.Errorf("failed to encode JSON output: %w", err)
391 }
392 return nil
393}
394
395// printChecksText prints the result in human-readable form to stderr.
396func printChecksText(result *ChecksResult) error {

Callers 2

RunChecksFunction · 0.85
TestPrintChecksJSONFunction · 0.85

Calls 1

ErrorfMethod · 0.45

Tested by 1

TestPrintChecksJSONFunction · 0.68