Skip to content

Commit

Permalink
🎨 make lint happy
Browse files Browse the repository at this point in the history
  • Loading branch information
kanrichan committed Oct 5, 2021
1 parent 8236874 commit e533170
Showing 1 changed file with 4 additions and 3 deletions.
7 changes: 4 additions & 3 deletions plugin_fortune/fortune.go
Original file line number Diff line number Diff line change
Expand Up @@ -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 底图类型
Expand Down Expand Up @@ -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
}

Expand Down

0 comments on commit e533170

Please sign in to comment.