(cmd *cobra.Command, name string)
| 545 | } |
| 546 | |
| 547 | func commandHasTopLevelName(cmd *cobra.Command, name string) bool { |
| 548 | var topLevel *cobra.Command |
| 549 | for c := cmd; c != nil && c.Parent() != nil; c = c.Parent() { |
| 550 | topLevel = c |
| 551 | } |
| 552 | return topLevel != nil && topLevel.Name() == name |
| 553 | } |
| 554 | |
| 555 | func sortedCopyStringSlice(values []string) []string { |
| 556 | if values == nil { |
no outgoing calls
no test coverage detected