From 4ae1200c09146b842156e3160f5b450f0689c018 Mon Sep 17 00:00:00 2001 From: Peter Bukva Date: Thu, 31 Oct 2024 02:39:10 +0000 Subject: [PATCH] Yet another go on making linter happy --- client/keys/import.go | 2 +- crypto/keyring/keyring.go | 4 ++-- 2 files changed, 3 insertions(+), 3 deletions(-) diff --git a/client/keys/import.go b/client/keys/import.go index 49b89d254..d698417c6 100644 --- a/client/keys/import.go +++ b/client/keys/import.go @@ -102,7 +102,7 @@ At the moment, only the secp256k1 curve/algo is supported.`, privKeyHexLC := strings.ToLower(privKeyHex) if strings.HasPrefix(privKeyHexLC, "0x") { privKeyHexLC = privKeyHexLC[2:] - } else if strings.HasPrefix(privKeyHexLC, "x") { + } else if strings.HasPrefix(privKeyHexLC, "x") { //nolint:gosimple,S1017 false positive, see https://github.com/dominikh/go-tools/issues/1447 privKeyHexLC = privKeyHexLC[1:] } diff --git a/crypto/keyring/keyring.go b/crypto/keyring/keyring.go index e43478ce1..8bab956d4 100644 --- a/crypto/keyring/keyring.go +++ b/crypto/keyring/keyring.go @@ -329,9 +329,9 @@ func (ks keystore) ImportUnarmoredPrivKey(uid string, unarmoredPrivKeyRaw []byte } // privKey, err := legacy.PrivKeyFromBytes(privKeyRaw) - //if err != nil { + // if err != nil { // return errors.Wrap(err, "failed to create private key from provided hex value") - //} + // } info, err := ks.writeLocalKey(uid, privKey, hd.PubKeyType(algo)) if err != nil {