Skip to content

Commit

Permalink
clean up
Browse files Browse the repository at this point in the history
  • Loading branch information
ezekg committed Nov 21, 2015
1 parent 5d0a058 commit a1a2ecb
Showing 1 changed file with 3 additions and 2 deletions.
5 changes: 3 additions & 2 deletions main.go
Expand Up @@ -38,7 +38,7 @@ func main() {

sniff := func(fileName string, hunk *diff.Hunk) {
errs <- func() error {
defer func() { wg.Done() }()
defer wg.Done()
return hound.Sniff(fileName, hunk)
}()
}
Expand All @@ -47,8 +47,9 @@ func main() {
fileName := fileDiff.NewName
hunks := fileDiff.GetHunks()

wg.Add(len(hunks))

for _, hunk := range hunks {
wg.Add(1)
go sniff(fileName, hunk)
}
}
Expand Down

0 comments on commit a1a2ecb

Please sign in to comment.