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

Function invalidPlugins

cli/cobra.go:364–375  ·  view source on GitHub ↗
(cmd *cobra.Command)

Source from the content-addressed store, hash-verified

362}
363
364func invalidPlugins(cmd *cobra.Command) []*cobra.Command {
365 cmds := []*cobra.Command{}
366 for _, sub := range cmd.Commands() {
367 if !isPlugin(sub) {
368 continue
369 }
370 if invalidPluginReason(sub) != "" {
371 cmds = append(cmds, sub)
372 }
373 }
374 return cmds
375}
376
377func invalidPluginReason(cmd *cobra.Command) string {
378 return cmd.Annotations[metadata.CommandAnnotationPluginInvalid]

Callers 2

hasInvalidPluginsFunction · 0.85
TestInvalidPluginFunction · 0.85

Calls 2

isPluginFunction · 0.85
invalidPluginReasonFunction · 0.85

Tested by 1

TestInvalidPluginFunction · 0.68

Used in the wild real call sites across dependent graphs

searching dependent graphs…