Skip to content

Commit

Permalink
refactor: remove redundant defer
Browse files Browse the repository at this point in the history
  • Loading branch information
alexandear authored and chavacava committed Nov 12, 2024
1 parent be95bfa commit 4c958ef
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 2 deletions.
2 changes: 1 addition & 1 deletion lint/linter.go
Original file line number Diff line number Diff line change
Expand Up @@ -109,7 +109,7 @@ func (l *Linter) Lint(packages [][]string, ruleSet []Rule, config Config) (<-cha
fmt.Fprintln(os.Stderr, err)
os.Exit(1)
}
defer wg.Done()
wg.Done()
}(packages[n], perPkgVersions[n])
}

Expand Down
2 changes: 1 addition & 1 deletion lint/package.go
Original file line number Diff line number Diff line change
Expand Up @@ -189,7 +189,7 @@ func (p *Package) lint(rules []Rule, config Config, failures chan Failure) {
wg.Add(1)
go (func(file *File) {
file.lint(rules, config, failures)
defer wg.Done()
wg.Done()
})(file)
}
wg.Wait()
Expand Down

0 comments on commit 4c958ef

Please sign in to comment.