//NewGroupsCommand creates the `groups` command
NewGroupsCommand creates the `groups` command
// NewGroupsCommand creates the ` groups ` command
func NewGroupsCommand() *cobra.Command {
	root := &cobra.Command{
		Use:              "groups",
		Short:            "Manage groups",
		Example:          "groups",
		TraverseChildren: true,
		SilenceErrors:    true,
		RunE: func(cmd *cobra.Command, args []string) error {
			groups, err := config.Client.GetGroups()
			if err != nil {
				golog.Errorf("Failed to find groups. [%s]", err.Error())
				return err
			}
			return bite.PrintObject(cmd, groups)
		},
	}
	root.AddCommand(NewGetGroupCommand())
	root.AddCommand(NewCreateGroupCommand())
	root.AddCommand(NewDeleteGroupCommand())
	root.AddCommand(NewUpdateGroupCommand())
	root.AddCommand(NewCloneGroupCommand())
	return root
}
func NewGroupsCommand ( ) * cobra . Command { root := & cobra . Command { Use : " " , Short : " " , Example : " " , TraverseChildren : true , SilenceErrors : true , RunE : func ( cmd * cobra . Command , args [ ] string ) error { groups , err := config . Client . GetGroups ( ) if err != nil { golog . Errorf ( " " , err . Error ( ) ) return err } return bite . PrintObject ( cmd , groups ) } , } root . AddCommand ( NewGetGroupCommand ( ) ) root . AddCommand ( NewCreateGroupCommand ( ) ) root . AddCommand ( NewDeleteGroupCommand ( ) ) root . AddCommand ( NewUpdateGroupCommand ( ) ) root . AddCommand ( NewCloneGroupCommand ( ) ) return root }
NewGroupsCommand creates the `groups` command
NewGroupsCommand creates the ` groups ` command