Merge pull request #721 from gzliudan/fix-s1025

contracts: fix staticcheck warning S1025: unnecessary fmt.Sprintf("%s", x)
This commit is contained in:
Daniel Liu 2024-10-31 21:48:44 +08:00 committed by GitHub
commit b74fccc04d
No known key found for this signature in database
GPG key ID: B5690EEEBB952194

View file

@ -556,7 +556,7 @@ func Decrypt(key []byte, cryptoText string) string {
// XORKeyStream can work in-place if the two arguments are the same.
stream.XORKeyStream(ciphertext, ciphertext)
return fmt.Sprintf("%s", ciphertext)
return string(ciphertext[:])
}
// Generate random string.