MCPcopy Index your code
hub / github.com/docker/cli / hideSubcommandIf

Function hideSubcommandIf

cmd/docker/docker.go:585–594  ·  view source on GitHub ↗
(subcmd *cobra.Command, condition func(string) bool, annotation string)

Source from the content-addressed store, hash-verified

583}
584
585func 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
596func hideUnsupportedFeatures(cmd *cobra.Command, details versionDetails) {
597 var (

Callers 1

hideUnsupportedFeaturesFunction · 0.85

Calls

no outgoing calls

Tested by

no test coverage detected

Used in the wild real call sites across dependent graphs

searching dependent graphs…