(command *cobra.Command)
| 247 | } |
| 248 | |
| 249 | func 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 | |
| 264 | func yesNo(value bool) string { |
| 265 | if value { |
no outgoing calls
no test coverage detected