Skip to content

Commit

Permalink
if there's no result, don't print anything
Browse files Browse the repository at this point in the history
  • Loading branch information
hakluke committed Dec 19, 2019
1 parent f50324f commit 31a4e6e
Showing 1 changed file with 5 additions and 1 deletion.
6 changes: 5 additions & 1 deletion main.go
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,11 @@ import (

func worker(ip string, wg *sync.WaitGroup) {
addr, err := net.LookupAddr(ip)
fmt.Println(ip, addr, err)
if err != nil{
wg.Done()
return
}
fmt.Println(ip, addr)
wg.Done()
}

Expand Down

0 comments on commit 31a4e6e

Please sign in to comment.