MCPcopy
hub / github.com/docker/compose / visitAll

Function visitAll

docs/yaml/main/generate.go:79–84  ·  view source on GitHub ↗

visitAll will traverse all commands from the root. This is different from the VisitAll of cobra.Command where only parents are checked.

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

Source from the content-addressed store, hash-verified

77// This is different from the VisitAll of cobra.Command where only parents
78// are checked.
79func visitAll(root *cobra.Command, fn func(*cobra.Command)) {
80 for _, cmd := range root.Commands() {
81 visitAll(cmd, fn)
82 }
83 fn(root)
84}
85
86type options struct {
87 source string

Callers 1

disableFlagsInUseLineFunction · 0.85

Calls

no outgoing calls

Tested by

no test coverage detected