INNER CODE UNIT · Go
relativeCommandPath
dropbox/dbxcli · tools/gen-docs/main.go:249
func relativeCommandPath(command *cobra.Command) string {
if command == nil {
return ""
}
path := command.CommandPath()
if command.Root() != nil {
rootName := command.Root().Name()
if path == rootName {
return path
}
return strings.TrimPrefix(path, rootName+" ")
}
return path
}
func yesNo(value bool) string {
if value {
return "yes"