(invocation *cobra.Command, target *cobra.Command)
| 317 | } |
| 318 | |
| 319 | func renderJSONHelp(invocation *cobra.Command, target *cobra.Command) error { |
| 320 | input := jsonHelpInput{ |
| 321 | Help: true, |
| 322 | Path: jsonHelpInputPath(target), |
| 323 | } |
| 324 | results := jsonHelpOperationResults(target) |
| 325 | out := newJSONCommandOperationOutput(target, input, results, nil) |
| 326 | return commandOutput(invocation).Render(nil, out) |
| 327 | } |
| 328 | |
| 329 | func jsonHelpInputPath(cmd *cobra.Command) string { |
| 330 | if cmd == nil || cmd.Root() == cmd { |
no test coverage detected