feat(recycler): add error cecycler (#10)

This commit is contained in:
Li4n0
2021-04-26 16:31:32 +08:00
committed by GitHub
parent 7e99d93e43
commit 3d8507e682
19 changed files with 263 additions and 67 deletions
+2 -2
View File
@@ -18,7 +18,7 @@ func init() {
if os.IsNotExist(err) {
err := download()
if err != nil {
log.Error("Download qqwry.dat failed, caused by:%v, recommend to download it by yourself otherwise the `IpArea` will be null", err)
log.Warn("Download qqwry.dat failed, caused by:%v, recommend to download it by yourself otherwise the `IpArea` will be null", err)
}
}
} else if time.Until(info.ModTime()) > 5*24*time.Hour {
@@ -36,7 +36,7 @@ func GetQQWry() *qqwry.QQwry {
init := qqwry.DatData.InitDatFile()
if v, ok := init.(error); ok {
if v != nil {
log.Error("qqwry init failed")
log.Warn("qqwry init failed")
wry = nil
}
}