Skip to content

Commit

Permalink
πŸ’©πŸ‘Œ make lint happy
Browse files Browse the repository at this point in the history
  • Loading branch information
fumiama committed Jun 6, 2024
1 parent 4d7b783 commit 3b3b17a
Show file tree
Hide file tree
Showing 3 changed files with 11 additions and 9 deletions.
1 change: 0 additions & 1 deletion .golangci.yml
Original file line number Diff line number Diff line change
@@ -1,6 +1,5 @@
linters-settings:
errcheck:
exclude-functions: ["fmt:.*"]
ignoretests: true

goimports:
Expand Down
14 changes: 7 additions & 7 deletions plugin/moyu/holiday_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -23,31 +23,31 @@ func TestSetHoliday(t *testing.T) {
t.Fatal(err)
}

err = SetHoliday("ε…ƒζ—¦", 1, 2024, 1, 1)
err = SetHoliday("ε…ƒζ—¦", 1, 2025, 1, 1)
if err != nil {
t.Fatal(err)
}
err = SetHoliday("ζ˜₯θŠ‚", 7, 2024, 2, 10)
err = SetHoliday("ζ˜₯θŠ‚", 7, 2025, 1, 29)
if err != nil {
t.Fatal(err)
}
err = SetHoliday("ζΈ…ζ˜ŽθŠ‚", 1, 2024, 4, 5)
err = SetHoliday("ζΈ…ζ˜ŽθŠ‚", 1, 2025, 4, 4)
if err != nil {
t.Fatal(err)
}
err = SetHoliday("εŠ³εŠ¨θŠ‚", 1, 2024, 5, 1)
err = SetHoliday("εŠ³εŠ¨θŠ‚", 1, 2025, 5, 1)
if err != nil {
t.Fatal(err)
}
err = SetHoliday("η«―εˆθŠ‚", 1, 2023, 6, 10)
err = SetHoliday("η«―εˆθŠ‚", 3, 2024, 6, 8)
if err != nil {
t.Fatal(err)
}
err = SetHoliday("δΈ­η§‹θŠ‚", 2, 2023, 9, 29)
err = SetHoliday("δΈ­η§‹θŠ‚", 3, 2024, 9, 15)
if err != nil {
t.Fatal(err)
}
err = SetHoliday("ε›½εΊ†θŠ‚", 6, 2023, 10, 1)
err = SetHoliday("ε›½εΊ†θŠ‚", 7, 2024, 10, 1)
if err != nil {
t.Fatal(err)
}
Expand Down
5 changes: 4 additions & 1 deletion plugin/moyu/nowork.go
Original file line number Diff line number Diff line change
Expand Up @@ -32,7 +32,10 @@ func GetHoliday(name string) *Holiday {
if err != nil {
return NewHoliday(name+err.Error(), 0, 0, 0, 0)
}
fmt.Sscanf(ret, "%d_%d_%d_%d", &dur, &year, &month, &day)
_, err = fmt.Sscanf(ret, "%d_%d_%d_%d", &dur, &year, &month, &day)
if err != nil {
return NewHoliday(name+err.Error(), 0, 0, 0, 0)
}
logrus.Debugln("[moyu]θŽ·ε–θŠ‚ζ—₯:", name, dur, year, month, day)
return NewHoliday(name, dur, year, month, day)
}
Expand Down

0 comments on commit 3b3b17a

Please sign in to comment.