File tree 5 files changed +34
-20
lines changed
5 files changed +34
-20
lines changed Original file line number Diff line number Diff line change 15
15
with :
16
16
go-version : ' 1.24.x'
17
17
- name : golangci-lint
18
- uses : golangci/golangci-lint-action@v6
18
+ uses : golangci/golangci-lint-action@v7
19
19
with :
20
20
version : latest
21
21
args : --timeout 3m0s
Original file line number Diff line number Diff line change
1
+ version : " 2"
1
2
linters :
3
+ exclusions :
4
+ generated : lax
5
+ presets :
6
+ - comments
7
+ - common-false-positives
8
+ - legacy
9
+ - std-error-handling
10
+ paths :
11
+ - out
12
+ - third_party$
13
+ - builtin$
14
+ - examples$
15
+ formatters :
2
16
enable :
3
- - gofumpt
4
17
- gci
5
-
6
- issues :
7
- exclude-dirs :
8
- - out
9
-
10
- # https://golangci-lint.run/usage/linters#linters-configuration
11
- linters-settings :
12
- gci :
13
- custom-order : true
14
- sections :
15
- - standard
16
- - default
17
- - prefix(github.com/j178/leetgo)
18
+ - gofumpt
19
+ settings :
20
+ gci :
21
+ sections :
22
+ - standard
23
+ - default
24
+ - prefix(github.com/j178/leetgo)
25
+ custom-order : true
26
+ exclusions :
27
+ generated : lax
28
+ paths :
29
+ - out
30
+ - third_party$
31
+ - builtin$
32
+ - examples$
Original file line number Diff line number Diff line change @@ -87,10 +87,11 @@ func createConfigFile(dir string) error {
87
87
cfg := config .Get ()
88
88
site := cfg .LeetCode .Site
89
89
language := cfg .Language
90
- if initTemplate == "us" {
90
+ switch initTemplate {
91
+ case "us" :
91
92
site = config .LeetCodeUS
92
93
language = config .EN
93
- } else if initTemplate == "cn" {
94
+ case "cn" :
94
95
site = config .LeetCodeCN
95
96
language = config .ZH
96
97
}
Original file line number Diff line number Diff line change @@ -15,7 +15,6 @@ import (
15
15
"gopkg.in/yaml.v3"
16
16
17
17
"github.com/j178/leetgo/constants"
18
-
19
18
"github.com/j178/leetgo/utils"
20
19
)
21
20
Original file line number Diff line number Diff line change @@ -11,10 +11,9 @@ import (
11
11
"github.com/charmbracelet/log"
12
12
"github.com/jedib0t/go-pretty/v6/list"
13
13
14
- goutils "github.com/j178/leetgo/testutils/go"
15
-
16
14
"github.com/j178/leetgo/config"
17
15
"github.com/j178/leetgo/leetcode"
16
+ goutils "github.com/j178/leetgo/testutils/go"
18
17
"github.com/j178/leetgo/utils"
19
18
)
20
19
You can’t perform that action at this time.
0 commit comments