mirror of
https://github.com/mgechev/revive.git
synced 2024-11-21 17:16:40 +02:00
refactor: remove redundant defer
This commit is contained in:
parent
be95bfa705
commit
4c958ef739
@ -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])
|
||||
}
|
||||
|
||||
|
@ -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()
|
||||
|
Loading…
Reference in New Issue
Block a user