func NewServiceAccountsCommand() *cobra.Command {
	root := &cobra.Command{
		Use:              "serviceaccounts",
		Short:            "Manage service accounts",
		Example:          "serviceaccounts",
		TraverseChildren: true,
		SilenceErrors:    true,
		RunE: func(cmd *cobra.Command, args []string) error {
			svcaccs, err := config.Client.GetServiceAccounts()
			if err != nil {
				golog.Errorf("Failed to find groups. [%s]", err.Error())
				return err
			}
			return bite.PrintObject(cmd, svcaccs)
		},
	}
	root.AddCommand(NewGetServiceAccountCommand())
	root.AddCommand(NewCreateServiceAccountCommand())
	root.AddCommand(NewUpdateServiceAccountCommand())
	root.AddCommand(NewDeleteServiceAccountCommand())
	root.AddCommand(NewRevokeServiceAccountCommand())
	return root
}
NewServiceAccountsCommand creates the `groups` command
package management
import (
	"fmt"
	"github.com/kataras/golog"
	"github.com/lensesio/bite"
	"github.com/lensesio/lenses-go/pkg/api"
	config "github.com/lensesio/lenses-go/pkg/configs"
	"github.com/spf13/cobra"
)