visitAll traverses all commands from the root.
(root *cobra.Command, fns ...func(*cobra.Command))
| 194 | |
| 195 | // visitAll traverses all commands from the root. |
| 196 | func 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 | |
| 205 | func newMetadataSubcommand(plugin *cobra.Command, meta metadata.Metadata) *cobra.Command { |
| 206 | if meta.ShortDescription == "" { |
no outgoing calls
searching dependent graphs…