Skip to content

Commit 8e1e61f

Browse files
committed
chore: refactor linter settings and file structure
- Remove `deadcode` linter and `structcheck` from `.golangci.yml` - Add settings for `depguard` linter in `.golangci.yml` - Rename `example/main.go` to `_example/main.go` Signed-off-by: appleboy <[email protected]>
1 parent 56c4a56 commit 8e1e61f

File tree

2 files changed

+18
-3
lines changed

2 files changed

+18
-3
lines changed

.golangci.yml

Lines changed: 18 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,6 @@ linters:
44
fast: false
55
enable:
66
- bodyclose
7-
- deadcode
87
- depguard
98
- dogsled
109
- dupl
@@ -29,15 +28,31 @@ linters:
2928
- nolintlint
3029
- rowserrcheck
3130
- staticcheck
32-
- structcheck
3331
- stylecheck
3432
- typecheck
3533
- unconvert
3634
- unparam
3735
- unused
38-
- varcheck
3936
- whitespace
4037
- gofumpt
4138

39+
linters-settings:
40+
depguard:
41+
rules:
42+
Main:
43+
files:
44+
- $all
45+
- "!$test"
46+
allow:
47+
- $gostd
48+
- github.com/gin-gonic/gin
49+
Test:
50+
files:
51+
- $test
52+
allow:
53+
- $gostd
54+
- github.com/gin-gonic/gin
55+
- github.com/stretchr/testify
56+
4257
run:
4358
timeout: 3m
File renamed without changes.

0 commit comments

Comments
 (0)