Skip to content

Commit

Permalink
action: enable gofmt lint; fix dupword.go formatting
Browse files Browse the repository at this point in the history
  • Loading branch information
alexandear authored and Abirdcfly committed Feb 18, 2024
1 parent 4263ed7 commit 981559a
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 2 deletions.
1 change: 1 addition & 0 deletions .github/workflows/lint.yml
Original file line number Diff line number Diff line change
Expand Up @@ -22,6 +22,7 @@ jobs:
uses: golangci/[email protected]
with:
version: latest
args: --enable=gofmt

- name: Build
run: go build -v ./...
Expand Down
4 changes: 2 additions & 2 deletions dupword.go
Original file line number Diff line number Diff line change
Expand Up @@ -75,15 +75,15 @@ type ignore struct {
}

func (a *ignore) String() string {
t := make([]string,0, len(ignoreWord))
t := make([]string, 0, len(ignoreWord))
for k := range ignoreWord {
t = append(t, k)
}
return strings.Join(t, ",")
}

func (a *ignore) Set(w string) error {
for _, k := range strings.Split(w, ","){
for _, k := range strings.Split(w, ",") {
ignoreWord[k] = true
}
return nil
Expand Down

0 comments on commit 981559a

Please sign in to comment.