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

Function addJSONFlag

pkg/cli/flags.go:38–40  ·  view source on GitHub ↗

addJSONFlag adds the --json/-j flag to a command. This flag enables JSON output format.

(cmd *cobra.Command)

Source from the content-addressed store, hash-verified

36// addJSONFlag adds the --json/-j flag to a command.
37// This flag enables JSON output format.
38func addJSONFlag(cmd *cobra.Command) {
39 cmd.Flags().BoolP("json", "j", false, "Output results in JSON format")
40}

Callers 15

NewLogsCommandFunction · 0.85
NewUpgradeCommandFunction · 0.85
NewListCommandFunction · 0.85
NewOutcomesCommandFunction · 0.85
NewStatusCommandFunction · 0.85
NewTrialCommandFunction · 0.85
NewChecksCommandFunction · 0.85
NewHealthCommandFunction · 0.85
NewExperimentsCommandFunction · 0.85

Calls

no outgoing calls

Tested by

no test coverage detected