From 5132d7f7e00cf0835aee92382c3dc2ba29d3af11 Mon Sep 17 00:00:00 2001 From: Daniel Liu Date: Thu, 31 Oct 2024 16:16:56 +0800 Subject: [PATCH] contracts: fix staticcheck warning S1025: unnecessary fmt.Sprintf("%s", x) --- contracts/utils.go | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/contracts/utils.go b/contracts/utils.go index 961ea1a61a..17e108ee64 100644 --- a/contracts/utils.go +++ b/contracts/utils.go @@ -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.