mirror of
https://github.com/Mrs4s/go-cqhttp.git
synced 2025-05-06 03:53:50 +08:00
fix: make golangci-lint happy
This commit is contained in:
parent
1db219fce0
commit
87754111ce
@ -239,6 +239,8 @@ func (c *HTTPClient) onBotPushEvent(e *coolq.Event) {
|
||||
for i := 0; i <= maxAttemptTimes; i++ {
|
||||
res, err = client.Do(req)
|
||||
if err == nil {
|
||||
//goland:noinspection GoDeferInLoop
|
||||
defer res.Body.Close()
|
||||
break
|
||||
}
|
||||
if i != maxAttemptTimes {
|
||||
@ -256,7 +258,6 @@ func (c *HTTPClient) onBotPushEvent(e *coolq.Event) {
|
||||
}
|
||||
log.Debugf("上报Event数据 %s 到 %v", e.JSONBytes(), c.addr)
|
||||
|
||||
defer res.Body.Close()
|
||||
r, err := io.ReadAll(res.Body)
|
||||
if err != nil {
|
||||
return
|
||||
|
Loading…
x
Reference in New Issue
Block a user