refactor: 自定义业务错误
This commit is contained in:
@@ -19,14 +19,16 @@ linters:
|
||||
files:
|
||||
- "**/internal/service/**"
|
||||
deny:
|
||||
- pkg: sub2api/internal/repository
|
||||
- pkg: github.com/Wei-Shaw/sub2api/internal/repository
|
||||
desc: "service must not import repository"
|
||||
- pkg: gorm.io/gorm
|
||||
desc: "service must not import gorm"
|
||||
handler-no-repository:
|
||||
list-mode: original
|
||||
files:
|
||||
- "**/internal/handler/**"
|
||||
deny:
|
||||
- pkg: sub2api/internal/repository
|
||||
- pkg: github.com/Wei-Shaw/sub2api/internal/repository
|
||||
desc: "handler must not import repository"
|
||||
errcheck:
|
||||
# Report about not checking of errors in type assertions: `a := b.(MyStruct)`.
|
||||
|
||||
Reference in New Issue
Block a user