From db779982d24da4ecdab5d3272ab115d1c6e48ea6 Mon Sep 17 00:00:00 2001 From: Mrs4s Date: Tue, 2 Nov 2021 02:45:26 +0800 Subject: [PATCH] style: rename package protocol to internal --- {protocol => internal}/crypto/crypto.go | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) rename {protocol => internal}/crypto/crypto.go (98%) diff --git a/protocol/crypto/crypto.go b/internal/crypto/crypto.go similarity index 98% rename from protocol/crypto/crypto.go rename to internal/crypto/crypto.go index 34e65bea..7de14c09 100644 --- a/protocol/crypto/crypto.go +++ b/internal/crypto/crypto.go @@ -96,7 +96,7 @@ func (e *EncryptECDH) FetchPubKey(uin int64) { if err != nil { return } - defer resp.Body.Close() + defer func() { _ = resp.Body.Close() }() pubKey := pubKeyResp{} err = json.NewDecoder(resp.Body).Decode(&pubKey) if err != nil {