Skip to content

Commit 981559a

Browse files
alexandearAbirdcfly
authored andcommittedFeb 18, 2024··
action: enable gofmt lint; fix dupword.go formatting
1 parent 4263ed7 commit 981559a

File tree

2 files changed

+3
-2
lines changed

2 files changed

+3
-2
lines changed
 

‎.github/workflows/lint.yml

+1
Original file line numberDiff line numberDiff line change
@@ -22,6 +22,7 @@ jobs:
2222
uses: golangci/golangci-lint-action@v3.2.0
2323
with:
2424
version: latest
25+
args: --enable=gofmt
2526

2627
- name: Build
2728
run: go build -v ./...

‎dupword.go

+2-2
Original file line numberDiff line numberDiff line change
@@ -75,15 +75,15 @@ type ignore struct {
7575
}
7676

7777
func (a *ignore) String() string {
78-
t := make([]string,0, len(ignoreWord))
78+
t := make([]string, 0, len(ignoreWord))
7979
for k := range ignoreWord {
8080
t = append(t, k)
8181
}
8282
return strings.Join(t, ",")
8383
}
8484

8585
func (a *ignore) Set(w string) error {
86-
for _, k := range strings.Split(w, ","){
86+
for _, k := range strings.Split(w, ",") {
8787
ignoreWord[k] = true
8888
}
8989
return nil

0 commit comments

Comments
 (0)
Please sign in to comment.