MCPcopy Create free account
hub / github.com/dropbox/dbxcli / renderJSONHelp

Function renderJSONHelp

cmd/help_json.go:319–327  ·  view source on GitHub ↗
(invocation *cobra.Command, target *cobra.Command)

Source from the content-addressed store, hash-verified

317}
318
319func 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
329func jsonHelpInputPath(cmd *cobra.Command) string {
330 if cmd == nil || cmd.Root() == cmd {

Callers 2

installJSONHelpFunction · 0.85
newJSONAwareHelpCommandFunction · 0.85

Calls 5

jsonHelpInputPathFunction · 0.85
jsonHelpOperationResultsFunction · 0.85
commandOutputFunction · 0.85
RenderMethod · 0.80

Tested by

no test coverage detected