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

Function findCommand

cmd/docker/docker.go:655–663  ·  view source on GitHub ↗

Checks if a command or one of its ancestors is in the list

(cmd *cobra.Command, cmds []string)

Source from the content-addressed store, hash-verified

653
654// Checks if a command or one of its ancestors is in the list
655func findCommand(cmd *cobra.Command, cmds []string) bool {
656 if cmd == nil {
657 return false
658 }
659 if slices.Contains(cmds, cmd.Name()) {
660 return true
661 }
662 return findCommand(cmd.Parent(), cmds)
663}
664
665func isSupported(cmd *cobra.Command, details versionDetails) error {
666 if err := areSubcommandsSupported(cmd, details); err != nil {

Callers 1

hideUnsupportedFeaturesFunction · 0.85

Calls 3

ContainsMethod · 0.80
ParentMethod · 0.80
NameMethod · 0.45

Tested by

no test coverage detected

Used in the wild real call sites across dependent graphs

searching dependent graphs…