From e533170160e5133e06cdf54ac395b4ebcb0da422 Mon Sep 17 00:00:00 2001 From: Kanri Date: Tue, 5 Oct 2021 12:16:36 +0800 Subject: [PATCH] =?UTF-8?q?=F0=9F=8E=A8=20make=20lint=20happy?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- plugin_fortune/fortune.go | 7 ++++--- 1 file changed, 4 insertions(+), 3 deletions(-) diff --git a/plugin_fortune/fortune.go b/plugin_fortune/fortune.go index 5607400c..6bada185 100644 --- a/plugin_fortune/fortune.go +++ b/plugin_fortune/fortune.go @@ -21,14 +21,12 @@ import ( "github.com/fogleman/gg" zero "github.com/wdvxdr1123/ZeroBot" - "github.com/wdvxdr1123/ZeroBot/extension/rate" "github.com/wdvxdr1123/ZeroBot/message" "github.com/FloatTech/ZeroBot-Plugin/control" ) var ( - limit = rate.NewManager(time.Minute*3, 5) // 底图缓存位置 base = "data/fortune/" // int64 群号 string 底图类型 @@ -154,7 +152,10 @@ func download(link, dest string) (string, error) { return "", err } defer f.Close() - f.Write(data) + _, err = f.Write(data) + if err != nil { + return "", err + } return dest + name, nil }