From 8317cfb8519028f441309c77cb5776a9741a6f7c Mon Sep 17 00:00:00 2001 From: anna-cross Date: Thu, 10 Nov 2022 15:29:58 -0500 Subject: [PATCH] Update error returns --- cmd/meroxa/turbine/ruby/build.go | 5 +++-- cmd/meroxa/turbine/ruby/deploy.go | 7 +++---- cmd/meroxa/turbine/ruby/init.go | 7 +++---- cmd/meroxa/turbine/ruby/run.go | 3 ++- cmd/meroxa/turbine/ruby/upgrade.go | 5 +++-- 5 files changed, 14 insertions(+), 13 deletions(-) diff --git a/cmd/meroxa/turbine/ruby/build.go b/cmd/meroxa/turbine/ruby/build.go index 1b24a8f7c..91beb48f8 100644 --- a/cmd/meroxa/turbine/ruby/build.go +++ b/cmd/meroxa/turbine/ruby/build.go @@ -2,14 +2,15 @@ package turbinerb import ( "context" + "fmt" ) func (t *turbineRbCLI) Build(ctx context.Context, appName string, platform bool) (string, error) { - return "", nil + return "", fmt.Errorf("command not implemented") } func (t *turbineRbCLI) CleanUpTempBuildLocation(ctx context.Context) error { - return nil + return fmt.Errorf("not implemented") } func (t *turbineRbCLI) CleanUpBinaries(ctx context.Context, appName string) { diff --git a/cmd/meroxa/turbine/ruby/deploy.go b/cmd/meroxa/turbine/ruby/deploy.go index 05eb9cbef..d848b4e19 100644 --- a/cmd/meroxa/turbine/ruby/deploy.go +++ b/cmd/meroxa/turbine/ruby/deploy.go @@ -2,26 +2,25 @@ package turbinerb import ( "context" + "fmt" utils "github.com/meroxa/cli/cmd/meroxa/turbine" ) func (t *turbineRbCLI) NeedsToBuild(ctx context.Context, appName string) (bool, error) { - return false, nil } func (t *turbineRbCLI) Deploy(ctx context.Context, imageName, appName, gitSha, specVersion, accountUUID string) (string, error) { var ( deploymentSpec string - err error ) - return deploymentSpec, err + return deploymentSpec, fmt.Errorf("command not implemented") } func (t *turbineRbCLI) GetResources(ctx context.Context, appName string) ([]utils.ApplicationResource, error) { var resources []utils.ApplicationResource - return resources, nil + return resources, fmt.Errorf("not implemented") } func (t *turbineRbCLI) GetGitSha(ctx context.Context) (string, error) { diff --git a/cmd/meroxa/turbine/ruby/init.go b/cmd/meroxa/turbine/ruby/init.go index a1a44903d..0f8181c5f 100644 --- a/cmd/meroxa/turbine/ruby/init.go +++ b/cmd/meroxa/turbine/ruby/init.go @@ -2,14 +2,13 @@ package turbinerb import ( "context" - - utils "github.com/meroxa/cli/cmd/meroxa/turbine" + "fmt" ) func (t *turbineRbCLI) Init(ctx context.Context, name string) error { - return nil + return fmt.Errorf("command unavailable") } func (t *turbineRbCLI) GitInit(ctx context.Context, name string) error { - return utils.GitInit(ctx, name) + return fmt.Errorf("command unavailable") } diff --git a/cmd/meroxa/turbine/ruby/run.go b/cmd/meroxa/turbine/ruby/run.go index 3ab848311..6f20caa8d 100644 --- a/cmd/meroxa/turbine/ruby/run.go +++ b/cmd/meroxa/turbine/ruby/run.go @@ -2,11 +2,12 @@ package turbinerb import ( "context" + "fmt" ) const GrpcServerPort = 50500 func (t *turbineRbCLI) Run(ctx context.Context) (err error) { // Run turbine-core gRPC server - return err + return fmt.Errorf("command not implemented") } diff --git a/cmd/meroxa/turbine/ruby/upgrade.go b/cmd/meroxa/turbine/ruby/upgrade.go index 7d23edd66..674f35f10 100644 --- a/cmd/meroxa/turbine/ruby/upgrade.go +++ b/cmd/meroxa/turbine/ruby/upgrade.go @@ -1,6 +1,7 @@ package turbinerb -// Upgrade fetches the latest Meroxa dependencies. +import "fmt" + func (t *turbineRbCLI) Upgrade(vendor bool) error { - return nil + return fmt.Errorf("command unavailable") }