Skip to content

Commit 83727cd

Browse files
committed
rename init.InitCommand to init.Command
1 parent 484be58 commit 83727cd

File tree

2 files changed

+6
-6
lines changed

2 files changed

+6
-6
lines changed

internal/namespaces/init/init.go

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -54,10 +54,10 @@ See below the schema `scw init` follows to ask for default config:
5454
*/
5555

5656
func GetCommands() *core.Commands {
57-
return core.NewCommands(InitCommand())
57+
return core.NewCommands(Command())
5858
}
5959

60-
type InitArgs struct {
60+
type Args struct {
6161
AccessKey string
6262
SecretKey string
6363
ProjectID string
@@ -70,7 +70,7 @@ type InitArgs struct {
7070
InstallAutocomplete *bool
7171
}
7272

73-
func InitCommand() *core.Command {
73+
func Command() *core.Command {
7474
return &core.Command{
7575
Groups: []string{"config"},
7676
Short: `Initialize the config`,
@@ -83,7 +83,7 @@ Default path for configuration file is based on the following priority order:
8383
- $USERPROFILE/.config/scw/config.yaml`,
8484
Namespace: "init",
8585
AllowAnonymousClient: true,
86-
ArgsType: reflect.TypeOf(InitArgs{}),
86+
ArgsType: reflect.TypeOf(Args{}),
8787
ArgSpecs: core.ArgSpecs{
8888
{
8989
Name: "secret-key",
@@ -132,7 +132,7 @@ Default path for configuration file is based on the following priority order:
132132
},
133133
},
134134
Run: func(ctx context.Context, argsI interface{}) (i interface{}, e error) {
135-
args := argsI.(*InitArgs)
135+
args := argsI.(*Args)
136136

137137
profileName := core.ExtractProfileName(ctx)
138138
configPath := core.ExtractConfigPath(ctx)

internal/namespaces/login/login.go

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -112,7 +112,7 @@ Once you connected to Scaleway, the profile should be configured.
112112
return nil, err
113113
}
114114

115-
resp, err := initCommand.InitCommand().Run(ctx, &initCommand.InitArgs{
115+
resp, err := initCommand.Command().Run(ctx, &initCommand.Args{
116116
AccessKey: apiKey.AccessKey,
117117
SecretKey: *apiKey.SecretKey,
118118
ProjectID: apiKey.DefaultProjectID,

0 commit comments

Comments
 (0)