diff --git a/internal/cmd/base/base.go b/internal/cmd/base/base.go index 2a97c1863..6d65d4b24 100644 --- a/internal/cmd/base/base.go +++ b/internal/cmd/base/base.go @@ -59,7 +59,7 @@ type Command struct { } // New returns a new instance of a base.Command type -func New(ui cli.Ui) *Command { +func NewCommand(ui cli.Ui) *Command { ctx, cancel := context.WithCancel(context.Background()) ret := &Command{ UI: ui, diff --git a/internal/cmd/commands.go b/internal/cmd/commands.go index f62b635ec..81fb8bbc3 100644 --- a/internal/cmd/commands.go +++ b/internal/cmd/commands.go @@ -53,33 +53,33 @@ func initCommands(ui, serverCmdUi cli.Ui, runOpts *RunOptions) { }, "hosts create": func() (cli.Command, error) { return &hosts.CreateCommand{ - Command: base.New(ui), + Command: base.NewCommand(ui), }, nil }, "projects create": func() (cli.Command, error) { return &scopes.CreateProjectCommand{ - Command: base.New(ui), + Command: base.NewCommand(ui), }, nil }, "projects read": func() (cli.Command, error) { return &scopes.ReadProjectCommand{ - Command: base.New(ui), + Command: base.NewCommand(ui), }, nil }, "config": func() (cli.Command, error) { return &config.Command{ - Command: base.New(ui), + Command: base.NewCommand(ui), }, nil }, "config encrypt": func() (cli.Command, error) { return &config.EncryptDecryptCommand{ - Command: base.New(ui), + Command: base.NewCommand(ui), Encrypt: true, }, nil }, "config decrypt": func() (cli.Command, error) { return &config.EncryptDecryptCommand{ - Command: base.New(ui), + Command: base.NewCommand(ui), }, nil }, } diff --git a/internal/cmd/commands/config/encryptdecrypt_test.go b/internal/cmd/commands/config/encryptdecrypt_test.go index a4c4b944b..a0e05d1c5 100644 --- a/internal/cmd/commands/config/encryptdecrypt_test.go +++ b/internal/cmd/commands/config/encryptdecrypt_test.go @@ -50,7 +50,7 @@ func TestEncryptDecrypt(t *testing.T) { } cmd := &EncryptDecryptCommand{ - Command: base.New(ui), + Command: base.NewCommand(ui), Encrypt: c.encrypt} if err := cmd.Run([]string{c.config}); err != 0 {