💩👌 make lint happy

This commit is contained in:
源文雨
2022-08-03 22:41:00 +08:00
parent 27c637ba66
commit e9a8b99f4f
3 changed files with 9 additions and 2 deletions

View File

@@ -143,8 +143,13 @@ func init() { // 插件主体
} else {
msg = append(msg, message.Text("也许是这个?"))
}
if err == nil && resp.StatusCode == http.StatusOK {
msg = append(msg, message.Image(result.Header.Thumbnail))
if err == nil {
_ = resp.Body.Close()
if resp.StatusCode == http.StatusOK {
msg = append(msg, message.Image(result.Header.Thumbnail))
} else {
msg = append(msg, message.Image(pic))
}
} else {
msg = append(msg, message.Image(pic))
}