From 3f04ca9548bbb0487754d964fab097bf779cc09d Mon Sep 17 00:00:00 2001 From: Daniel Liu Date: Fri, 3 Jan 2025 20:07:27 +0800 Subject: [PATCH] accounts: changed if-else blocks to conform with golint (#16654) --- accounts/keystore/keystore_passphrase.go | 3 +-- accounts/keystore/keystore_plain.go | 3 +-- 2 files changed, 2 insertions(+), 4 deletions(-) diff --git a/accounts/keystore/keystore_passphrase.go b/accounts/keystore/keystore_passphrase.go index a58d152b1c2de..0c8e621bfeef1 100644 --- a/accounts/keystore/keystore_passphrase.go +++ b/accounts/keystore/keystore_passphrase.go @@ -108,9 +108,8 @@ func (ks keyStorePassphrase) StoreKey(filename string, key *Key, auth string) er func (ks keyStorePassphrase) JoinPath(filename string) string { if filepath.IsAbs(filename) { return filename - } else { - return filepath.Join(ks.keysDirPath, filename) } + return filepath.Join(ks.keysDirPath, filename) } // EncryptKey encrypts a key using the specified scrypt parameters into a json diff --git a/accounts/keystore/keystore_plain.go b/accounts/keystore/keystore_plain.go index 045a9cc0429c9..15bfe64a7e8bb 100644 --- a/accounts/keystore/keystore_plain.go +++ b/accounts/keystore/keystore_plain.go @@ -56,7 +56,6 @@ func (ks keyStorePlain) StoreKey(filename string, key *Key, auth string) error { func (ks keyStorePlain) JoinPath(filename string) string { if filepath.IsAbs(filename) { return filename - } else { - return filepath.Join(ks.keysDirPath, filename) } + return filepath.Join(ks.keysDirPath, filename) }