3 ms·
What I would do in that case is modify checkUrl to return a bool, change the return to return response.StatusCode == 200, and change the for loop contents to
by Zikes 12y ago
What I would do in that case is modify checkUrl to return a bool, change the return to return response.StatusCode == 200, and change the for loop contents to
if !checkUrl(url){
fmt.Printf("Non-200 response for %s", url)
break
}