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

Function jsonCommandPath

cmd/json_output.go:161–176  ·  view source on GitHub ↗
(cmd *cobra.Command)

Source from the content-addressed store, hash-verified

159}
160
161func jsonCommandPath(cmd *cobra.Command) string {
162 if cmd == nil {
163 return ""
164 }
165 if cmd.Parent() == nil {
166 return cmd.Name()
167 }
168
169 var parts []string
170 for c := cmd; c != nil && c.Parent() != nil; c = c.Parent() {
171 if name := c.Name(); name != "" {
172 parts = append([]string{name}, parts...)
173 }
174 }
175 return strings.Join(parts, " ")
176}

Callers 5

newJSONErrorResponseFunction · 0.85
withJSONCommandFunction · 0.85
jsonHelpInputPathFunction · 0.85
publicCommandSubtreeFunction · 0.85
jsonManifestCommandPathFunction · 0.85

Calls

no outgoing calls

Tested by

no test coverage detected