mirror of
https://github.com/FloatTech/ZeroBot-Plugin.git
synced 2025-12-20 14:30:10 +08:00
💩👌 make lint happy
This commit is contained in:
parent
27c637ba66
commit
e9a8b99f4f
@ -19,6 +19,7 @@ func getrealurl(url string) (realurl string, err error) {
|
|||||||
if err != nil {
|
if err != nil {
|
||||||
return
|
return
|
||||||
}
|
}
|
||||||
|
_ = data.Body.Close()
|
||||||
realurl = data.Request.URL.String()
|
realurl = data.Request.URL.String()
|
||||||
return
|
return
|
||||||
}
|
}
|
||||||
|
|||||||
@ -755,6 +755,7 @@ func getListMusic(listID, pathOfMusic string) (musicName string, err error) {
|
|||||||
err = errors.Errorf("下载音乐失败, ERROR: %s", err)
|
err = errors.Errorf("下载音乐失败, ERROR: %s", err)
|
||||||
return
|
return
|
||||||
}
|
}
|
||||||
|
_ = response.Body.Close()
|
||||||
if response.StatusCode != 200 {
|
if response.StatusCode != 200 {
|
||||||
err = errors.Errorf("下载音乐失败, Status Code: %d", response.StatusCode)
|
err = errors.Errorf("下载音乐失败, Status Code: %d", response.StatusCode)
|
||||||
return
|
return
|
||||||
|
|||||||
@ -143,8 +143,13 @@ func init() { // 插件主体
|
|||||||
} else {
|
} else {
|
||||||
msg = append(msg, message.Text("也许是这个?"))
|
msg = append(msg, message.Text("也许是这个?"))
|
||||||
}
|
}
|
||||||
if err == nil && resp.StatusCode == http.StatusOK {
|
if err == nil {
|
||||||
msg = append(msg, message.Image(result.Header.Thumbnail))
|
_ = resp.Body.Close()
|
||||||
|
if resp.StatusCode == http.StatusOK {
|
||||||
|
msg = append(msg, message.Image(result.Header.Thumbnail))
|
||||||
|
} else {
|
||||||
|
msg = append(msg, message.Image(pic))
|
||||||
|
}
|
||||||
} else {
|
} else {
|
||||||
msg = append(msg, message.Image(pic))
|
msg = append(msg, message.Image(pic))
|
||||||
}
|
}
|
||||||
|
|||||||
Loading…
Reference in New Issue
Block a user