From b3be4ff8e7eca02fb2bc2ed99b488195dfb2b858 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=E5=AE=87=7E?= <158024940+xyy0411@users.noreply.github.com> Date: Sun, 13 Oct 2024 23:50:52 +0800 Subject: [PATCH] Update draw.go --- plugin/niuniu/draw.go | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/plugin/niuniu/draw.go b/plugin/niuniu/draw.go index 9174b4710b..17202feddb 100644 --- a/plugin/niuniu/draw.go +++ b/plugin/niuniu/draw.go @@ -19,6 +19,9 @@ type drawer []drawUserRanking func (allUsers drawer) drawRanking(t bool) (img image.Image, err error) { fontbyte, err := file.GetLazyData(text.GlowSansFontFile, control.Md5File, true) + if err != nil { + return nil,err + } var ( title string s string @@ -39,7 +42,7 @@ func (allUsers drawer) drawRanking(t bool) (img image.Image, err error) { if err != nil { return nil, err } - _ = resp.Close + _ = resp.Body.Close() ri[i] = &rendercard.RankInfo{ Avatar: decode, TopLeftText: user.Name,