diff --git a/ch1/fetchall.go b/ch1/fetchall.go index d9bb043..91e8d96 100644 --- a/ch1/fetchall.go +++ b/ch1/fetchall.go @@ -26,11 +26,11 @@ func fetch(url string, ch chan<- string) { start := time.Now() resp, err := http.Get(url) if err != nil { - ch <- fmt.Sprint(err) + ch <- fmt.Sprint(err) // Отправка в канал ch return } nbytes, err := io.Copy(ioutil.Discard, resp.Body) - resp.Body.Close() + resp.Body.Close() //Исключение утечки ресурсов if err != nil { ch <- fmt.Sprintf("while reading %s: %v", url, err) return