Skip to content

Commit

Permalink
chore: make lint happy
Browse files Browse the repository at this point in the history
  • Loading branch information
fumiama committed Aug 19, 2024
1 parent c9939d1 commit de558dc
Show file tree
Hide file tree
Showing 3 changed files with 13 additions and 13 deletions.
6 changes: 3 additions & 3 deletions plugin/manager/timer/parse.go
Original file line number Diff line number Diff line change
Expand Up @@ -96,12 +96,12 @@ func GetFilledTimer(dateStrs []string, botqq, grp int64, matchDateOnly bool) *Ti
if len(minuteStr) == 3 {
minuteStr = []rune{minuteStr[0], minuteStr[2]} // 去除中间的十
}
min := chineseNum2Int(minuteStr)
if min < -1 || min > 59 { // 分钟非法
minute := chineseNum2Int(minuteStr)
if minute < -1 || minute > 59 { // 分钟非法
t.Alert = "分钟非法!"
return &t
}
t.SetMinute(min)
t.SetMinute(minute)
if !matchDateOnly {
urlStr := dateStrs[5]
if urlStr != "" { // 是图片url
Expand Down
12 changes: 6 additions & 6 deletions plugin/manager/timer/wrap.go
Original file line number Diff line number Diff line change
Expand Up @@ -44,10 +44,10 @@ func (t *Timer) Hour() (h int) {
}

// Minute 6bits
func (t *Timer) Minute() (min int) {
min = int(t.En1Month4Day5Week3Hour5Min6 & 0x00003f)
if min == 0b111111 {
min = -1
func (t *Timer) Minute() (m int) {
m = int(t.En1Month4Day5Week3Hour5Min6 & 0x00003f)
if m == 0b111111 {
m = -1
}
return
}
Expand Down Expand Up @@ -82,6 +82,6 @@ func (t *Timer) SetHour(h int) {
}

// SetMinute ...
func (t *Timer) SetMinute(min int) {
t.En1Month4Day5Week3Hour5Min6 = (int32(min) & 0x00003f) | (t.En1Month4Day5Week3Hour5Min6 & 0xffffc0)
func (t *Timer) SetMinute(m int) {
t.En1Month4Day5Week3Hour5Min6 = (int32(m) & 0x00003f) | (t.En1Month4Day5Week3Hour5Min6 & 0xffffc0)
}
8 changes: 4 additions & 4 deletions plugin/mcfish/main.go
Original file line number Diff line number Diff line change
Expand Up @@ -208,7 +208,7 @@ func init() {
Min: probableList[2],
Max: probableList[3],
}
min := make(map[string]int, 4)
minMap := make(map[string]int, 4)
for _, info := range articlesInfo.ArticleInfo {
switch {
case info.Type == "pole" || info.Name == "美西螈":
Expand All @@ -228,10 +228,10 @@ func init() {
durationList[info.Name] = info.Durable
}
probabilities[info.Name] = probabilityLimit{
Min: min[info.Type],
Max: min[info.Type] + info.Probability,
Min: minMap[info.Type],
Max: minMap[info.Type] + info.Probability,
}
min[info.Type] += info.Probability
minMap[info.Type] += info.Probability
}
// }()
}
Expand Down

0 comments on commit de558dc

Please sign in to comment.