From a48899e3e3476a35650966a40e2a2acd87e37fea Mon Sep 17 00:00:00 2001 From: Juan Leni Date: Fri, 8 Feb 2019 20:06:21 +0100 Subject: [PATCH] adjusting according review --- client/keys/add.go | 4 ---- client/keys/delete.go | 3 --- client/keys/show.go | 4 ---- client/keys/update.go | 8 +------- 4 files changed, 1 insertion(+), 18 deletions(-) diff --git a/client/keys/add.go b/client/keys/add.go index d49042dc955d..d9dfe985fc5d 100644 --- a/client/keys/add.go +++ b/client/keys/add.go @@ -95,10 +95,6 @@ func runAddCmd(_ *cobra.Command, args []string) error { var err error var encryptPassword string - if len(args) < 1 { - return errors.New("not enough arguments") - } - buf := client.BufferStdin() name := args[0] diff --git a/client/keys/delete.go b/client/keys/delete.go index 60f3e10db638..614bcce7c98d 100644 --- a/client/keys/delete.go +++ b/client/keys/delete.go @@ -47,9 +47,6 @@ gaiacli. } func runDeleteCmd(cmd *cobra.Command, args []string) error { - if len(args) < 1 { - return errors.New("a name must be provided") - } name := args[0] kb, err := NewKeyBaseFromHomeFlag() diff --git a/client/keys/show.go b/client/keys/show.go index b04a9fd2c0fb..4c1ddf216c2e 100644 --- a/client/keys/show.go +++ b/client/keys/show.go @@ -64,10 +64,6 @@ func showKeysCmd() *cobra.Command { func runShowCmd(cmd *cobra.Command, args []string) (err error) { var info keys.Info - if len(args) < 1 { - return errors.New("not enough arguments") - } - if len(args) == 1 { info, err = GetKeyInfo(args[0]) if err != nil { diff --git a/client/keys/update.go b/client/keys/update.go index f26a1d1a6c0f..d3a03f22c7c3 100644 --- a/client/keys/update.go +++ b/client/keys/update.go @@ -5,12 +5,10 @@ import ( "fmt" "net/http" - "github.com/pkg/errors" - "github.com/gorilla/mux" "github.com/cosmos/cosmos-sdk/client" - keys "github.com/cosmos/cosmos-sdk/crypto/keys" + "github.com/cosmos/cosmos-sdk/crypto/keys" "github.com/spf13/cobra" @@ -28,10 +26,6 @@ func updateKeyCommand() *cobra.Command { } func runUpdateCmd(cmd *cobra.Command, args []string) error { - if len(args) < 1 { - return errors.New("not enough arguments") - } - name := args[0] buf := client.BufferStdin()