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

Function visitAll

cli-plugins/plugin/plugin.go:196–203  ·  view source on GitHub ↗

visitAll traverses all commands from the root.

(root *cobra.Command, fns ...func(*cobra.Command))

Source from the content-addressed store, hash-verified

194
195// visitAll traverses all commands from the root.
196func visitAll(root *cobra.Command, fns ...func(*cobra.Command)) {
197 for _, cmd := range root.Commands() {
198 visitAll(cmd, fns...)
199 }
200 for _, fn := range fns {
201 fn(root)
202 }
203}
204
205func newMetadataSubcommand(plugin *cobra.Command, meta metadata.Metadata) *cobra.Command {
206 if meta.ShortDescription == "" {

Callers 2

TestVisitAllFunction · 0.70
newPluginCommandFunction · 0.70

Calls

no outgoing calls

Tested by 1

TestVisitAllFunction · 0.56

Used in the wild real call sites across dependent graphs

searching dependent graphs…