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

Function relativeCommandPath

tools/gen-docs/main.go:249–262  ·  view source on GitHub ↗
(command *cobra.Command)

Source from the content-addressed store, hash-verified

247}
248
249func relativeCommandPath(command *cobra.Command) string {
250 if command == nil {
251 return ""
252 }
253 path := command.CommandPath()
254 if command.Root() != nil {
255 rootName := command.Root().Name()
256 if path == rootName {
257 return path
258 }
259 return strings.TrimPrefix(path, rootName+" ")
260 }
261 return path
262}
263
264func yesNo(value bool) string {
265 if value {

Callers 1

commandMetadataSectionFunction · 0.85

Calls

no outgoing calls

Tested by

no test coverage detected