✏️ 美化 log & 更新 banner

This commit is contained in:
fumiama 2021-09-27 21:31:38 +08:00
parent 3623a88b16
commit 48442330c1
2 changed files with 21 additions and 16 deletions

View File

@ -53,7 +53,7 @@ import (
var ( var (
contents = []string{ contents = []string{
"* OneBot + ZeroBot + Golang", "* OneBot + ZeroBot + Golang",
"* Version 1.1.5 - 2021-09-09 20:52:33 +0800 CST", "* Version 1.1.6 - 2021-09-27 21:30:33 +0800 CST",
"* Copyright © 2020 - 2021 Kanri, DawnNights, Fumiama, Suika", "* Copyright © 2020 - 2021 Kanri, DawnNights, Fumiama, Suika",
"* Project: https://github.com/FloatTech/ZeroBot-Plugin", "* Project: https://github.com/FloatTech/ZeroBot-Plugin",
} }

View File

@ -3,11 +3,12 @@ package reborn
import ( import (
"encoding/json" "encoding/json"
"io" "io"
"log"
"net/http" "net/http"
"os" "os"
"time"
wr "github.com/mroth/weightedrand" wr "github.com/mroth/weightedrand"
log "github.com/sirupsen/logrus"
) )
const ( const (
@ -26,6 +27,8 @@ var (
) )
func init() { func init() {
go func() {
time.Sleep(time.Second)
area := make(rate, 226) area := make(rate, 226)
err := load(&area) err := load(&area)
if err != nil { if err != nil {
@ -40,6 +43,8 @@ func init() {
if err != nil { if err != nil {
panic(err) panic(err)
} }
log.Printf("[Reborn] 读取%d个国家/地区", len(area))
}()
} }
// load 加载rate数据 // load 加载rate数据