fix: close resp body (#124)
This commit is contained in:
parent
bd26a39049
commit
496a742d20
@ -72,6 +72,7 @@ func (w *WeChatPushHook) getWxAccessToken() string {
|
|||||||
if err != nil {
|
if err != nil {
|
||||||
return ""
|
return ""
|
||||||
}
|
}
|
||||||
|
defer resp.Body.Close()
|
||||||
body, _ := io.ReadAll(resp.Body)
|
body, _ := io.ReadAll(resp.Body)
|
||||||
var ret accessTokenRes
|
var ret accessTokenRes
|
||||||
_ = json.Unmarshal(body, &ret)
|
_ = json.Unmarshal(body, &ret)
|
||||||
|
|||||||
Loading…
Reference in New Issue
Block a user