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))
| 77 | // This is different from the VisitAll of cobra.Command where only parents |
| 78 | // are checked. |
| 79 | func visitAll(root *cobra.Command, fn func(*cobra.Command)) { |
| 80 | for _, cmd := range root.Commands() { |
| 81 | visitAll(cmd, fn) |
| 82 | } |
| 83 | fn(root) |
| 84 | } |
| 85 | |
| 86 | type options struct { |
| 87 | source string |
no outgoing calls
no test coverage detected