Welcome to mirror list, hosted at ThFree Co, Russian Federation.

github.com/MHSanaei/3x-ui.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorIlya Kryuchkov <42733472+kr-ilya@users.noreply.github.com>2026-01-05 07:54:56 +0300
committerGitHub <noreply@github.com>2026-01-05 07:54:56 +0300
commit6041d10e3d5d8b0021dd596bdee8f0064a495f80 (patch)
tree897ac55d8389dfea859e6071d08c56f97e843a09 /util/crypto
parent4800f8fb706a092a38255ee70904227238b2a6f6 (diff)
Refactor code and fix linter warnings (#3627)
* refactor: use any instead of empty interface * refactor: code cleanup
Diffstat (limited to 'util/crypto')
-rw-r--r--util/crypto/crypto.go3
1 files changed, 1 insertions, 2 deletions
diff --git a/util/crypto/crypto.go b/util/crypto/crypto.go
index 05d088a8..2db5bd83 100644
--- a/util/crypto/crypto.go
+++ b/util/crypto/crypto.go
@@ -13,6 +13,5 @@ func HashPasswordAsBcrypt(password string) (string, error) {
// CheckPasswordHash verifies if the given password matches the bcrypt hash.
func CheckPasswordHash(hash, password string) bool {
- err := bcrypt.CompareHashAndPassword([]byte(hash), []byte(password))
- return err == nil
+ return bcrypt.CompareHashAndPassword([]byte(hash), []byte(password)) == nil
}