(subcmd *cobra.Command, condition func(string) bool, annotation string)
| 583 | } |
| 584 | |
| 585 | func hideSubcommandIf(subcmd *cobra.Command, condition func(string) bool, annotation string) { |
| 586 | if subcmd.Hidden { |
| 587 | return |
| 588 | } |
| 589 | if v, ok := subcmd.Annotations[annotation]; ok { |
| 590 | if condition(v) { |
| 591 | subcmd.Hidden = true |
| 592 | } |
| 593 | } |
| 594 | } |
| 595 | |
| 596 | func hideUnsupportedFeatures(cmd *cobra.Command, details versionDetails) { |
| 597 | var ( |
no outgoing calls
no test coverage detected
searching dependent graphs…