(cmd *cobra.Command)
| 334 | } |
| 335 | |
| 336 | func jsonHelpOperationResults(cmd *cobra.Command) []jsonOperationResult { |
| 337 | commands := publicCommandSubtree(cmd) |
| 338 | results := make([]jsonOperationResult, 0, len(commands)) |
| 339 | for _, command := range commands { |
| 340 | results = append(results, newJSONOperationResult( |
| 341 | jsonHelpStatusDescribed, |
| 342 | jsonHelpKindCommand, |
| 343 | nil, |
| 344 | jsonCommandManifestFor(command), |
| 345 | )) |
| 346 | } |
| 347 | return results |
| 348 | } |
| 349 | |
| 350 | func publicCommandSubtree(cmd *cobra.Command) []*cobra.Command { |
| 351 | if cmd == nil { |
no test coverage detected