Skip to content

Commit 5c18eb6

Browse files
Updated the readme
1 parent abf306a commit 5c18eb6

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

README.md

+1-1
Original file line numberDiff line numberDiff line change
@@ -32,6 +32,7 @@ func main() {
3232
for _, url := range urls {
3333
wg.BlockAdd()
3434
go func(url string) {
35+
defer wg.Done()
3536
fmt.Println("%s: checking", url)
3637
res, err := http.Get(url)
3738
if err != nil {
@@ -40,7 +41,6 @@ func main() {
4041
defer res.Body.Close()
4142
fmt.Println("%s: result: %v", err)
4243
}
43-
wg.Done()
4444
}(url)
4545
}
4646

0 commit comments

Comments
 (0)