From 31ec030b9aba37d69b1936fe028aeaee90d57047 Mon Sep 17 00:00:00 2001 From: Leonardo Date: Thu, 6 Jun 2019 19:56:50 +0200 Subject: [PATCH] move wg.Wait() outside of for-loop Signed-off-by: Leonardo --- cmd/flares/main.go | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/cmd/flares/main.go b/cmd/flares/main.go index 5a41d58..2838c43 100644 --- a/cmd/flares/main.go +++ b/cmd/flares/main.go @@ -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 } @@ -127,9 +127,10 @@ func main() { wg.Done() }(domain) - wg.Wait() } + wg.Wait() + return nil }