Hacker Newsnew | past | comments | ask | show | jobs | submitlogin

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
    }


Guidelines | FAQ | Lists | API | Security | Legal | Apply to YC | Contact

Search: