瀏覽代碼

accounts: changed if-else blocks to conform with golint (#16654)

GagziW 7 年之前
父節點
當前提交
541f299fbb
共有 2 個文件被更改,包括 2 次插入4 次删除
  1. 1 2
      accounts/keystore/keystore_passphrase.go
  2. 1 2
      accounts/keystore/keystore_plain.go

+ 1 - 2
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

+ 1 - 2
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)
 }