diff options
author | Valery Piashchynski <[email protected]> | 2022-03-09 09:09:46 +0100 |
---|---|---|
committer | Valery Piashchynski <[email protected]> | 2022-03-09 09:09:46 +0100 |
commit | ac021525b68512f2d855ec7a870a0d2086a5f318 (patch) | |
tree | 30dd607d2f8c88b34871248eeb421c0a0c1fc69b /internal/cli/reset | |
parent | 1c5a6a590832bbefb2cab99a81f413a5a0e756de (diff) |
viper auto envs and ${} syntax support for the internal RPC client
Signed-off-by: Valery Piashchynski <[email protected]>
Diffstat (limited to 'internal/cli/reset')
-rw-r--r-- | internal/cli/reset/command.go | 4 | ||||
-rw-r--r-- | internal/cli/reset/command_test.go | 2 |
2 files changed, 3 insertions, 3 deletions
diff --git a/internal/cli/reset/command.go b/internal/cli/reset/command.go index a0634c31..ce29d248 100644 --- a/internal/cli/reset/command.go +++ b/internal/cli/reset/command.go @@ -17,7 +17,7 @@ import ( var spinnerStyle = []string{"∙∙∙", "●∙∙", "∙●∙", "∙∙●", "∙∙∙"} //nolint:gochecknoglobals // NewCommand creates `reset` command. -func NewCommand(cfgFile *string) *cobra.Command { //nolint:funlen +func NewCommand(cfgFile *string, override *[]string) *cobra.Command { //nolint:funlen return &cobra.Command{ Use: "reset", Short: "Reset workers of all or specific RoadRunner service", @@ -32,7 +32,7 @@ func NewCommand(cfgFile *string) *cobra.Command { //nolint:funlen return errors.E(op, errors.Str("no configuration file provided")) } - client, err := internalRpc.NewClient(*cfgFile) + client, err := internalRpc.NewClient(*cfgFile, *override) if err != nil { return err } diff --git a/internal/cli/reset/command_test.go b/internal/cli/reset/command_test.go index ca68cb54..57801453 100644 --- a/internal/cli/reset/command_test.go +++ b/internal/cli/reset/command_test.go @@ -10,7 +10,7 @@ import ( func TestCommandProperties(t *testing.T) { path := "" - cmd := reset.NewCommand(&path) + cmd := reset.NewCommand(&path, nil) assert.Equal(t, "reset", cmd.Use) assert.NotNil(t, cmd.RunE) |