Fix lint errors

This commit is contained in:
世界 2026-06-22 15:49:11 +08:00
parent a9f4123ba2
commit 46aa536b37
No known key found for this signature in database
GPG key ID: CD109927C34A63C4
41 changed files with 498 additions and 406 deletions

View file

@ -1,35 +1,24 @@
version: "2"
run:
go: "1.25"
go: "1.24"
linters:
default: none
enable:
- govet
- ineffassign
- paralleltest
- staticcheck
- modernize
settings:
staticcheck:
checks:
- all
- -S1000
- -S1008
- -S1017
- -ST1003
- -QF1001
- -QF1003
- -QF1008
- -QF1008 # could remove embedded field "<interface>" from selector
- -ST1003 # should not use ALL_CAPS in Go names; use CamelCase instead
- -QF1001 # could apply De Morgan's law
exclusions:
generated: lax
presets:
- comments
- common-false-positives
- legacy
- std-error-handling
paths:
- third_party$
- builtin$
- examples$
formatters:
enable:
- gci
@ -42,8 +31,4 @@ formatters:
- default
custom-order: true
exclusions:
generated: lax
paths:
- third_party$
- builtin$
- examples$
generated: lax