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