Skip to content

Commit 8d7f1ec

Browse files
committed
make lint happy
1 parent 6fe3cf3 commit 8d7f1ec

File tree

5 files changed

+9
-11
lines changed

5 files changed

+9
-11
lines changed

.golangci.yml

+4-6
Original file line numberDiff line numberDiff line change
@@ -44,7 +44,7 @@ linters:
4444
fast: false
4545
enable:
4646
- bodyclose
47-
- deadcode
47+
#- deadcode
4848
- depguard
4949
- dogsled
5050
- errcheck
@@ -65,13 +65,13 @@ linters:
6565
- nolintlint
6666
- rowserrcheck
6767
- staticcheck
68-
- structcheck
68+
#- structcheck
6969
- stylecheck
7070
- typecheck
7171
- unconvert
7272
- unparam
7373
- unused
74-
- varcheck
74+
#- varcheck
7575
- whitespace
7676
- prealloc
7777
- predeclared
@@ -86,13 +86,11 @@ run:
8686
deadline: 5m
8787
issues-exit-code: 1
8888
tests: false
89-
skip-dirs:
90-
- order
9189
go: '1.20'
9290

9391
# output configuration options
9492
output:
95-
format: "colored-line-number"
93+
formats: ["colored-line-number"]
9694
print-issued-lines: true
9795
print-linter-name: true
9896
uniq-by-line: true

example/JiangRed/message.go

+1-1
Original file line numberDiff line numberDiff line change
@@ -165,7 +165,7 @@ func init() {
165165
return
166166
}
167167
})
168-
engine.OnFullMatch("我是什么职位", customrule2).SetBlock(true).Handle(func(ctx *zero.Ctx) {
168+
engine.OnFullMatch("我是什么职位", customrule2).SetBlock(true).Handle(func(_ *zero.Ctx) {
169169
})
170170
}
171171

plugin/draw/draw.go

+1-1
Original file line numberDiff line numberDiff line change
@@ -100,7 +100,7 @@ func init() { // 主函数
100100
tab := "\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\n"
101101
tmp.WriteString("\t\t\t\t <---------服务详情---------> \t\t\t\t")
102102
// managers.ForEach(func(key string, service *ctrl.Control[*zero.Ctx]) bool {
103-
control.ForEachByPrio(func(p int, service *ctrl.Control[*zero.Ctx]) bool {
103+
control.ForEachByPrio(func(_ int, service *ctrl.Control[*zero.Ctx]) bool {
104104
key := service.Service
105105
i++
106106
if i > end+1 && lenmap > 5 {

plugin/fgopickup/service.go

+2-2
Original file line numberDiff line numberDiff line change
@@ -18,11 +18,11 @@ func (s *service) getPickupDetail(pickupID int) (pickupDetailRes, error) {
1818
if err != nil {
1919
return res, err
2020
}
21-
servantIds, err := dao.selectServantIDsByPickupID(pickupID)
21+
servantIDs, err := dao.selectServantIDsByPickupID(pickupID)
2222
if err != nil {
2323
return res, err
2424
}
25-
servants, err := dao.selectServantsByIDs(servantIds)
25+
servants, err := dao.selectServantsByIDs(servantIDs)
2626
if err != nil {
2727
return res, err
2828
}

plugin/qqci/qqci.go

+1-1
Original file line numberDiff line numberDiff line change
@@ -44,7 +44,7 @@ func init() {
4444
_ = os.RemoveAll(cachePath)
4545
_ = os.MkdirAll(cachePath, 0755)
4646
adb = initialize(engine.DataFolder() + "qqci.db")
47-
getdb := fcext.DoOnceOnSuccess(func(ctx *zero.Ctx) bool {
47+
getdb := fcext.DoOnceOnSuccess(func(_ *zero.Ctx) bool {
4848
_, _ = engine.GetLazyData("makefile.tpl", true)
4949
_, _ = engine.GetLazyData("load.tpl", true)
5050
return true

0 commit comments

Comments
 (0)