1
0
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:
Oleksandr Redko 2024-11-11 20:48:34 +02:00 committed by chavacava
parent be95bfa705
commit 4c958ef739
2 changed files with 2 additions and 2 deletions

View File

@ -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])
}

View File

@ -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()