Skip to content

Commit 265f051

Browse files
chore(valkey): apply PR feedback
1 parent 025d15a commit 265f051

9 files changed

Lines changed: 23 additions & 23 deletions

File tree

internal/cmd/valkey/credentials/create/create.go

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -41,10 +41,10 @@ func NewCmd(params *types.CmdParams) *cobra.Command {
4141
Example: examples.Build(
4242
examples.NewExample(
4343
`Create credentials for a Valkey instance with ID "xxx"`,
44-
"$ stackit beta valkey credentials create --instance-id xxx"),
44+
"$ stackit valkey credentials create --instance-id xxx"),
4545
examples.NewExample(
4646
`Create credentials for a Valkey instance and show the password in the output`,
47-
"$ stackit beta valkey credentials create --instance-id xxx --show-password"),
47+
"$ stackit valkey credentials create --instance-id xxx --show-password"),
4848
),
4949
RunE: func(cmd *cobra.Command, args []string) error {
5050
ctx := context.Background()

internal/cmd/valkey/credentials/delete/delete.go

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -40,7 +40,7 @@ func NewCmd(params *types.CmdParams) *cobra.Command {
4040
Example: examples.Build(
4141
examples.NewExample(
4242
`Delete credentials with ID "xxx" of a Valkey instance with ID "yyy"`,
43-
"$ stackit beta valkey credentials delete xxx --instance-id yyy"),
43+
"$ stackit valkey credentials delete xxx --instance-id yyy"),
4444
),
4545
RunE: func(cmd *cobra.Command, args []string) error {
4646
ctx := context.Background()

internal/cmd/valkey/credentials/describe/describe.go

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -40,10 +40,10 @@ func NewCmd(params *types.CmdParams) *cobra.Command {
4040
Example: examples.Build(
4141
examples.NewExample(
4242
`Get details of credentials with ID "xxx" from a Valkey instance with ID "yyy"`,
43-
"$ stackit beta valkey credentials describe xxx --instance-id yyy"),
43+
"$ stackit valkey credentials describe xxx --instance-id yyy"),
4444
examples.NewExample(
4545
`Get details of credentials with ID "xxx" from a Valkey instance with ID "yyy" in JSON format`,
46-
"$ stackit beta valkey credentials describe xxx --instance-id yyy --output-format json"),
46+
"$ stackit valkey credentials describe xxx --instance-id yyy --output-format json"),
4747
),
4848
RunE: func(cmd *cobra.Command, args []string) error {
4949
ctx := context.Background()

internal/cmd/valkey/credentials/list/list.go

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -39,13 +39,13 @@ func NewCmd(params *types.CmdParams) *cobra.Command {
3939
Example: examples.Build(
4040
examples.NewExample(
4141
`List all credentials' IDs for a Valkey instance with ID "xxx"`,
42-
"$ stackit beta valkey credentials list --instance-id xxx"),
42+
"$ stackit valkey credentials list --instance-id xxx"),
4343
examples.NewExample(
4444
`List all credentials' IDs for a Valkey instance with ID "xxx" in JSON format`,
45-
"$ stackit beta valkey credentials list --instance-id xxx --output-format json"),
45+
"$ stackit valkey credentials list --instance-id xxx --output-format json"),
4646
examples.NewExample(
4747
`List up to 10 credentials' IDs for a Valkey instance with ID "xxx"`,
48-
"$ stackit beta valkey credentials list --instance-id xxx --limit 10"),
48+
"$ stackit valkey credentials list --instance-id xxx --limit 10"),
4949
),
5050
RunE: func(cmd *cobra.Command, args []string) error {
5151
ctx := context.Background()

internal/cmd/valkey/instance/create/create.go

Lines changed: 6 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -68,13 +68,13 @@ func NewCmd(params *types.CmdParams) *cobra.Command {
6868
Example: examples.Build(
6969
examples.NewExample(
7070
`Create a Valkey instance with name "my-instance" and specify plan by name and version`,
71-
"$ stackit beta valkey instance create --name my-instance --plan-name stackit-keyvalue-1.2.10-replica --version 8"),
71+
"$ stackit valkey instance create --name my-instance --plan-name stackit-keyvalue-1.2.10-replica --version 8"),
7272
examples.NewExample(
7373
`Create a Valkey instance with name "my-instance" and specify plan by ID`,
74-
"$ stackit beta valkey instance create --name my-instance --plan-id xxx"),
74+
"$ stackit valkey instance create --name my-instance --plan-id xxx"),
7575
examples.NewExample(
7676
`Create a Valkey instance with name "my-instance" and specify IP range which is allowed to access it`,
77-
"$ stackit beta valkey instance create --name my-instance --plan-id xxx --acl 1.2.3.0/24"),
77+
"$ stackit valkey instance create --name my-instance --plan-id xxx --acl 1.2.3.0/24"),
7878
),
7979
RunE: func(cmd *cobra.Command, args []string) error {
8080
ctx := context.Background()
@@ -248,10 +248,10 @@ func buildRequest(ctx context.Context, model *inputModel, apiClient valkey.Defau
248248
}
249249

250250
func outputResult(p *print.Printer, model *inputModel, projectLabel, instanceId string, resp *valkey.CreateInstanceResponse) error {
251+
if model == nil {
252+
return fmt.Errorf("no model passed")
253+
}
251254
return p.OutputResult(model.OutputFormat, resp, func() error {
252-
if model == nil {
253-
return fmt.Errorf("no model passed")
254-
}
255255
if resp == nil {
256256
return fmt.Errorf("no response defined")
257257
}

internal/cmd/valkey/instance/delete/delete.go

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -38,7 +38,7 @@ func NewCmd(params *types.CmdParams) *cobra.Command {
3838
Example: examples.Build(
3939
examples.NewExample(
4040
`Delete a Valkey instance with ID "xxx"`,
41-
"$ stackit beta valkey instance delete xxx"),
41+
"$ stackit valkey instance delete xxx"),
4242
),
4343
RunE: func(cmd *cobra.Command, args []string) error {
4444
ctx := context.Background()

internal/cmd/valkey/instance/describe/describe.go

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -38,10 +38,10 @@ func NewCmd(params *types.CmdParams) *cobra.Command {
3838
Example: examples.Build(
3939
examples.NewExample(
4040
`Get details of a Valkey instance with ID "xxx"`,
41-
"$ stackit beta valkey instance describe xxx"),
41+
"$ stackit valkey instance describe xxx"),
4242
examples.NewExample(
4343
`Get details of a Valkey instance with ID "xxx" in JSON format`,
44-
"$ stackit beta valkey instance describe xxx --output-format json"),
44+
"$ stackit valkey instance describe xxx --output-format json"),
4545
),
4646
RunE: func(cmd *cobra.Command, args []string) error {
4747
ctx := context.Background()

internal/cmd/valkey/instance/list/list.go

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -38,13 +38,13 @@ func NewCmd(params *types.CmdParams) *cobra.Command {
3838
Example: examples.Build(
3939
examples.NewExample(
4040
`List all Valkey instances`,
41-
"$ stackit beta valkey instance list"),
41+
"$ stackit valkey instance list"),
4242
examples.NewExample(
4343
`List all Valkey instances in JSON format`,
44-
"$ stackit beta valkey instance list --output-format json"),
44+
"$ stackit valkey instance list --output-format json"),
4545
examples.NewExample(
4646
`List up to 10 Valkey instances`,
47-
"$ stackit beta valkey instance list --limit 10"),
47+
"$ stackit valkey instance list --limit 10"),
4848
),
4949
RunE: func(cmd *cobra.Command, args []string) error {
5050
ctx := context.Background()

internal/cmd/valkey/instance/update/update.go

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -69,13 +69,13 @@ func NewCmd(params *types.CmdParams) *cobra.Command {
6969
Example: examples.Build(
7070
examples.NewExample(
7171
`Update the plan of a Valkey instance with ID "xxx" by plan ID`,
72-
"$ stackit beta valkey instance update xxx --plan-id yyy"),
72+
"$ stackit valkey instance update xxx --plan-id yyy"),
7373
examples.NewExample(
7474
`Update the plan of a Valkey instance with ID "xxx" by name and version`,
75-
"$ stackit beta valkey instance update xxx --plan-name stackit-keyvalue-1.2.10-replica --version 8"),
75+
"$ stackit valkey instance update xxx --plan-name stackit-keyvalue-1.2.10-replica --version 8"),
7676
examples.NewExample(
7777
`Update the range of IPs allowed to access a Valkey instance with ID "xxx"`,
78-
"$ stackit beta valkey instance update xxx --acl 1.2.3.0/24"),
78+
"$ stackit valkey instance update xxx --acl 1.2.3.0/24"),
7979
),
8080
RunE: func(cmd *cobra.Command, args []string) error {
8181
ctx := context.Background()

0 commit comments

Comments
 (0)