Skip to content

Commit

Permalink
chore(revive): make lint happy
Browse files Browse the repository at this point in the history
  • Loading branch information
fumiama committed Mar 4, 2024
1 parent 6c20f22 commit ece68da
Show file tree
Hide file tree
Showing 6 changed files with 11 additions and 11 deletions.
2 changes: 1 addition & 1 deletion go.mod
Original file line number Diff line number Diff line change
Expand Up @@ -24,7 +24,6 @@ require (
github.com/fumiama/go-base16384 v1.7.0
github.com/fumiama/go-registry v0.2.6
github.com/fumiama/gotracemoe v0.0.3
github.com/fumiama/imgsz v0.0.2
github.com/fumiama/jieba v0.0.0-20221203025406-36c17a10b565
github.com/fumiama/unibase2n v0.0.0-20221020155353-02876e777430
github.com/golang/freetype v0.0.0-20170609003504-e2365dfdc4a0
Expand Down Expand Up @@ -57,6 +56,7 @@ require (
github.com/faiface/beep v1.1.0 // indirect
github.com/fumiama/go-simple-protobuf v0.1.0 // indirect
github.com/fumiama/gofastTEA v0.0.10 // indirect
github.com/fumiama/imgsz v0.0.2 // indirect
github.com/gabriel-vasile/mimetype v1.0.4 // indirect
github.com/go-ole/go-ole v1.2.6 // indirect
github.com/go-task/slim-sprig v0.0.0-20230315185526-52ccab3ef572 // indirect
Expand Down
2 changes: 1 addition & 1 deletion plugin/bilibili/bilibilimodel.go
Original file line number Diff line number Diff line change
Expand Up @@ -75,7 +75,7 @@ func updateVup() error {
if err != nil {
return err
}
gjson.Get(binary.BytesToString(data), "@this").ForEach(func(key, value gjson.Result) bool {
gjson.Get(binary.BytesToString(data), "@this").ForEach(func(_, value gjson.Result) bool {
mid := value.Get("mid").Int()
uname := value.Get("uname").String()
roomid := value.Get("roomid").Int()
Expand Down
4 changes: 2 additions & 2 deletions plugin/guessmusic/struct.go
Original file line number Diff line number Diff line change
Expand Up @@ -241,9 +241,9 @@ type listInfoOfAPI struct {
PublishTime int64 `json:"publishTime"`
Tns []string `json:"tns,omitempty"`
} `json:"tracks"`
VideoIds interface{} `json:"videoIds"`
VideoIDs interface{} `json:"videoIds"`
Videos interface{} `json:"videos"`
TrackIds []struct {
TrackIDs []struct {
ID int `json:"id"`
V int `json:"v"`
T int `json:"t"`
Expand Down
2 changes: 1 addition & 1 deletion plugin/manager/timer/sleep.go
Original file line number Diff line number Diff line change
Expand Up @@ -155,7 +155,7 @@ func (t *Timer) judgeHM() {
if t.SelfID != 0 {
t.sendmsg(t.GrpID, zero.GetBot(t.SelfID))
} else {
zero.RangeBot(func(id int64, ctx *zero.Ctx) (_ bool) {
zero.RangeBot(func(_ int64, ctx *zero.Ctx) (_ bool) {
t.sendmsg(t.GrpID, ctx)
return
})
Expand Down
10 changes: 5 additions & 5 deletions plugin/steam/listenter.go
Original file line number Diff line number Diff line change
Expand Up @@ -57,14 +57,14 @@ func init() {
return
}
// 收集这波用户的streamId,然后查当前的状态,并建立信息映射表
streamIds := make([]string, len(infos))
streamIDs := make([]string, len(infos))
localPlayerMap := make(map[int64]*player)
for i := 0; i < len(infos); i++ {
streamIds[i] = strconv.FormatInt(infos[i].SteamID, 10)
streamIDs[i] = strconv.FormatInt(infos[i].SteamID, 10)
localPlayerMap[infos[i].SteamID] = infos[i]
}
// 将所有用户状态查一遍
playerStatus, err := getPlayerStatus(streamIds...)
playerStatus, err := getPlayerStatus(streamIDs...)
if err != nil {
// 出错就发消息
ctx.SendPrivateMessage(su, message.Text("[steam] ERROR: ", err))
Expand Down Expand Up @@ -117,11 +117,11 @@ func init() {
}

// getPlayerStatus 获取用户状态
func getPlayerStatus(streamIds ...string) ([]*player, error) {
func getPlayerStatus(streamIDs ...string) ([]*player, error) {
players := make([]*player, 0)
// 拼接请求地址
apiKeyMu.Lock()
url := fmt.Sprintf(apiurl+statusurl, apiKey, strings.Join(streamIds, ","))
url := fmt.Sprintf(apiurl+statusurl, apiKey, strings.Join(streamIDs, ","))
apiKeyMu.Unlock()
// 拉取并解析数据
data, err := web.GetData(url)
Expand Down
2 changes: 1 addition & 1 deletion plugin/thesaurus/chat.go
Original file line number Diff line number Diff line change
Expand Up @@ -178,7 +178,7 @@ func init() {
engine.OnMessage(canmatch(tKAWA), match(chatListK, seg)).
SetBlock(false).
Handle(randreply(sm.K))
engine.OnMessage(canmatch(tALPACA), func(ctx *zero.Ctx) bool {
engine.OnMessage(canmatch(tALPACA), func(_ *zero.Ctx) bool {
return alpacapiurl != "" && alpacatoken != ""
}).SetBlock(false).Handle(func(ctx *zero.Ctx) {
msg := ctx.ExtractPlainText()
Expand Down

0 comments on commit ece68da

Please sign in to comment.