diff --git a/fetch.go b/fetch.go index b75545a..58b539c 100644 --- a/fetch.go +++ b/fetch.go @@ -2,6 +2,8 @@ package hmm import ( "bufio" + "io" + "io/ioutil" "net/http" ) @@ -23,6 +25,9 @@ func Lines(url string) <-chan string { r <- s.Text() } // ignore errors + // if resp.StatusCode != http.StatusOK {} + io.Copy(ioutil.Discard, resp.Body) + resp.Body.Close() }() return r