Skip to content

Commit

Permalink
move wg.Wait() outside of for-loop
Browse files Browse the repository at this point in the history
Signed-off-by: Leonardo <[email protected]>
  • Loading branch information
lfaoro committed Jun 6, 2019
1 parent 8e13af8 commit 31ec030
Showing 1 changed file with 3 additions and 2 deletions.
5 changes: 3 additions & 2 deletions cmd/flares/main.go
Original file line number Diff line number Diff line change
Expand Up @@ -110,7 +110,7 @@ func main() {
wg.Add(1)
go func(domain string) {
if debugFlag {
fmt.Println("closure domain:", domain)
fmt.Println("domain:", domain)
wg.Done()
return
}
Expand All @@ -127,9 +127,10 @@ func main() {
wg.Done()
}(domain)

wg.Wait()
}

wg.Wait()

return nil
}

Expand Down

0 comments on commit 31ec030

Please sign in to comment.