// NewContextCmd creates a new command to manage service contexts
NewContextCmd creates a new command to manage service contexts
// NewContextCmd creates a new command to manage service contexts
func NewContextCmd(f *factory.Factory) *cobra.Command {
	cmd := &cobra.Command{
		Use:     "context",
		Short:   f.Localizer.MustLocalize("context.cmd.shortDescription"),
		Long:    f.Localizer.MustLocalize("context.cmd.longDescription"),
		Example: f.Localizer.MustLocalize("context.cmd.example"),
		Args:    cobra.NoArgs,
	}
	kafkaUseCmd := kafkaUse.NewUseCommand(f)
	kafkaUseCmd.Use = "set-kafka"
	kafkaUseCmd.Example = f.Localizer.MustLocalize("context.setKafka.cmd.example")
	statusCmd := status.NewStatusCommand(f)
	statusCmd.Long = f.Localizer.MustLocalize("context.status.cmd.longDescription")
	statusCmd.Example = f.Localizer.MustLocalize("context.status.cmd.example")
	registryUseCmd := registryUse.NewUseCommand(f)
	registryUseCmd.Use = "set-service-registry"
	registryUseCmd.Example = f.Localizer.MustLocalize("context.setRegistry.cmd.example")
	cmd.AddCommand(
		use.NewUseCommand(f),
		list.NewListCommand(f),
		create.NewCreateCommand(f),
		delete.NewDeleteCommand(f),
		unset.NewUnsetCommand(f),
		kafkaUseCmd,
		registryUseCmd,
		statusCmd,
	)
	return cmd
}
func NewContextCmd ( f * factory . Factory ) * cobra . Command { cmd := & cobra . Command { Use : " " , Short : f . Localizer . MustLocalize ( " " ) , Long : f . Localizer . MustLocalize ( " " ) , Example : f . Localizer . MustLocalize ( " " ) , Args : cobra . NoArgs , } kafkaUseCmd := kafkaUse . NewUseCommand ( f ) kafkaUseCmd . Use = " " kafkaUseCmd . Example = f . Localizer . MustLocalize ( " " ) statusCmd := status . NewStatusCommand ( f ) statusCmd . Long = f . Localizer . MustLocalize ( " " ) statusCmd . Example = f . Localizer . MustLocalize ( " " ) registryUseCmd := registryUse . NewUseCommand ( f ) registryUseCmd . Use = " " registryUseCmd . Example = f . Localizer . MustLocalize ( " " ) cmd . AddCommand ( use . NewUseCommand ( f ) , list . NewListCommand ( f ) , create . NewCreateCommand ( f ) , delete . NewDeleteCommand ( f ) , unset . NewUnsetCommand ( f ) , kafkaUseCmd , registryUseCmd , statusCmd , ) return cmd }
NewContextCmd creates a new command to manage service contexts
NewContextCmd creates a new command to manage service contexts
// The implementation of `rhoas kafka use` command has been aliased here as `rhoas context set-kafka` // `rhoas status` cmd has been re-used as `rhoas context status` // The implementation of `rhoas service-registry use` command has been aliased here as `rhoas context set-service-registry` // reused sub-commands