Skip to content

Commit 3efe54f

Browse files
committed
wip: renamed commands
1 parent 2ece9e5 commit 3efe54f

File tree

12 files changed

+14
-14
lines changed

12 files changed

+14
-14
lines changed

internal/cmd/beta/alb/alb.go

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,7 @@ package alb
22

33
import (
44
"github.com/stackitcloud/stackit-cli/internal/cmd/beta/alb/create"
5-
"github.com/stackitcloud/stackit-cli/internal/cmd/beta/alb/credentials"
5+
"github.com/stackitcloud/stackit-cli/internal/cmd/beta/alb/observability-credentials"
66
"github.com/stackitcloud/stackit-cli/internal/cmd/beta/alb/delete"
77
"github.com/stackitcloud/stackit-cli/internal/cmd/beta/alb/describe"
88
"github.com/stackitcloud/stackit-cli/internal/cmd/beta/alb/list"

internal/cmd/beta/alb/credentials/create/create.go renamed to internal/cmd/beta/alb/observability-credentials/add/add.go

Lines changed: 6 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
package create
1+
package add
22

33
import (
44
"bytes"
@@ -36,14 +36,14 @@ type inputModel struct {
3636

3737
func NewCmd(p *print.Printer) *cobra.Command {
3838
cmd := &cobra.Command{
39-
Use: "create",
39+
Use: "add",
4040
Short: "Creates a credential",
4141
Long: "Creates a credential.",
4242
Args: cobra.NoArgs,
4343
Example: examples.Build(
4444
examples.NewExample(
45-
`Create a new credential, the password is requested interactively or read from ENV variable `+passwordEnv,
46-
"$ stackit beta alb credential create --username some.user --displayname master-creds",
45+
`Add new credentials, the password is requested interactively or read from ENV variable `+passwordEnv,
46+
"$ stackit beta alb credential add --username some.user --displayname master-creds",
4747
),
4848
),
4949
RunE: func(cmd *cobra.Command, _ []string) error {
@@ -65,7 +65,7 @@ func NewCmd(p *print.Printer) *cobra.Command {
6565
}
6666

6767
if !model.AssumeYes {
68-
prompt := "Are your sure you want to create a credential?"
68+
prompt := "Are your sure you want to add credentials?"
6969
err = p.PromptForConfirmation(prompt)
7070
if err != nil {
7171
return err
@@ -76,7 +76,7 @@ func NewCmd(p *print.Printer) *cobra.Command {
7676
req := buildRequest(ctx, model, apiClient)
7777
resp, err := req.Execute()
7878
if err != nil {
79-
return fmt.Errorf("create credential: %w", err)
79+
return fmt.Errorf("add credential: %w", err)
8080
}
8181

8282
return outputResult(p, model.GlobalFlagModel.OutputFormat, resp)

internal/cmd/beta/alb/credentials/create/create_test.go renamed to internal/cmd/beta/alb/observability-credentials/add/add_test.go

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
package create
1+
package add
22

33
import (
44
"context"

internal/cmd/beta/alb/credentials/credentials.go renamed to internal/cmd/beta/alb/observability-credentials/observability-credentials.go

Lines changed: 6 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -3,11 +3,11 @@ package credentials
33
import (
44
"github.com/spf13/cobra"
55

6-
"github.com/stackitcloud/stackit-cli/internal/cmd/beta/alb/credentials/create"
7-
"github.com/stackitcloud/stackit-cli/internal/cmd/beta/alb/credentials/delete"
8-
"github.com/stackitcloud/stackit-cli/internal/cmd/beta/alb/credentials/describe"
9-
"github.com/stackitcloud/stackit-cli/internal/cmd/beta/alb/credentials/list"
10-
"github.com/stackitcloud/stackit-cli/internal/cmd/beta/alb/credentials/update"
6+
add "github.com/stackitcloud/stackit-cli/internal/cmd/beta/alb/observability-credentials/add"
7+
"github.com/stackitcloud/stackit-cli/internal/cmd/beta/alb/observability-credentials/delete"
8+
"github.com/stackitcloud/stackit-cli/internal/cmd/beta/alb/observability-credentials/describe"
9+
"github.com/stackitcloud/stackit-cli/internal/cmd/beta/alb/observability-credentials/list"
10+
"github.com/stackitcloud/stackit-cli/internal/cmd/beta/alb/observability-credentials/update"
1111
"github.com/stackitcloud/stackit-cli/internal/pkg/print"
1212
"github.com/stackitcloud/stackit-cli/internal/pkg/utils"
1313
)
@@ -25,7 +25,7 @@ func NewCmd(p *print.Printer) *cobra.Command {
2525
}
2626

2727
func addSubcommands(cmd *cobra.Command, p *print.Printer) {
28-
cmd.AddCommand(create.NewCmd(p))
28+
cmd.AddCommand(add.NewCmd(p))
2929
cmd.AddCommand(delete.NewCmd(p))
3030
cmd.AddCommand(describe.NewCmd(p))
3131
cmd.AddCommand(list.NewCmd(p))

0 commit comments

Comments
 (0)