MCPcopy Create free account
hub / github.com/Facets-cloud/flow / runJSON

Function runJSON

internal/app/list.go:908–914  ·  view source on GitHub ↗

runJSON is a thin wrapper that reports errors as exit code 1.

(w io.Writer, v any)

Source from the content-addressed store, hash-verified

906
907// runJSON is a thin wrapper that reports errors as exit code 1.
908func runJSON(w io.Writer, v any) int {
909 if err := listfmt.RenderJSON(w, v); err != nil {
910 fmt.Fprintf(os.Stderr, "error: %v\n", err)
911 return 1
912 }
913 return 0
914}
915
916// dimHeaders wraps each header label in dim ANSI when color is enabled so
917// the header line reads as supporting text rather than a row of data.

Callers 6

emptyResultFunction · 0.85
listTagsCmdFunction · 0.85
listTasksCmdFunction · 0.85
listProjectsCmdFunction · 0.85
listPlaybooksCmdFunction · 0.85
listRunsCmdFunction · 0.85

Calls 1

RenderJSONFunction · 0.92

Tested by

no test coverage detected