mirror of
https://github.com/FloatTech/ZeroBot-Plugin.git
synced 2025-12-21 23:50:09 +08:00
🎨 make lint happy
This commit is contained in:
parent
8236874779
commit
e533170160
@ -21,14 +21,12 @@ import (
|
|||||||
|
|
||||||
"github.com/fogleman/gg"
|
"github.com/fogleman/gg"
|
||||||
zero "github.com/wdvxdr1123/ZeroBot"
|
zero "github.com/wdvxdr1123/ZeroBot"
|
||||||
"github.com/wdvxdr1123/ZeroBot/extension/rate"
|
|
||||||
"github.com/wdvxdr1123/ZeroBot/message"
|
"github.com/wdvxdr1123/ZeroBot/message"
|
||||||
|
|
||||||
"github.com/FloatTech/ZeroBot-Plugin/control"
|
"github.com/FloatTech/ZeroBot-Plugin/control"
|
||||||
)
|
)
|
||||||
|
|
||||||
var (
|
var (
|
||||||
limit = rate.NewManager(time.Minute*3, 5)
|
|
||||||
// 底图缓存位置
|
// 底图缓存位置
|
||||||
base = "data/fortune/"
|
base = "data/fortune/"
|
||||||
// int64 群号 string 底图类型
|
// int64 群号 string 底图类型
|
||||||
@ -154,7 +152,10 @@ func download(link, dest string) (string, error) {
|
|||||||
return "", err
|
return "", err
|
||||||
}
|
}
|
||||||
defer f.Close()
|
defer f.Close()
|
||||||
f.Write(data)
|
_, err = f.Write(data)
|
||||||
|
if err != nil {
|
||||||
|
return "", err
|
||||||
|
}
|
||||||
return dest + name, nil
|
return dest + name, nil
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
Loading…
Reference in New Issue
Block a user