Skip to content

Commit 19b61f7

Browse files
committed
Add default cases to switch. (golangci-lint)
Signed-off-by: Kurt Garloff <[email protected]>
1 parent fb34a02 commit 19b61f7

File tree

1 file changed

+4
-0
lines changed

1 file changed

+4
-0
lines changed

pkg/cmd/create.go

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -147,6 +147,8 @@ func GetCreateOptions(ctx context.Context, clusterStackPath string) (*CreateOpti
147147
remoteFactory = github.NewFactory()
148148
case "oci":
149149
remoteFactory = oci.NewFactory()
150+
default:
151+
return nil, errors.New("please provide a valied remote repo")
150152
}
151153

152154
ac, err := remoteFactory.NewClient(ctx)
@@ -199,6 +201,8 @@ func GetCreateOptions(ctx context.Context, clusterStackPath string) (*CreateOpti
199201
if err != nil {
200202
return nil, fmt.Errorf("failed to handle custom mode: %w", err)
201203
}
204+
default:
205+
return nil, errors.New("please use a valid mode")
202206
}
203207

204208
releaseDirName, err := clusterstack.GetClusterStackReleaseDirectoryName(createOption.Metadata, createOption.Config)

0 commit comments

Comments
 (0)