(parent *cobra.Command, title string, cmds ...*cobra.Command)
| 3 | import "github.com/spf13/cobra" |
| 4 | |
| 5 | func AddGroup(parent *cobra.Command, title string, cmds ...*cobra.Command) { |
| 6 | g := &cobra.Group{ |
| 7 | Title: title, |
| 8 | ID: title, |
| 9 | } |
| 10 | parent.AddGroup(g) |
| 11 | for _, c := range cmds { |
| 12 | c.GroupID = g.ID |
| 13 | parent.AddCommand(c) |
| 14 | } |
| 15 | } |
no outgoing calls
no test coverage detected