From 80c7f64162d5b51d388d9d8f7adacbf0c4d1a691 Mon Sep 17 00:00:00 2001 From: hoteas Date: Fri, 1 Dec 2017 07:33:19 +0000 Subject: [PATCH] --- dri/download/download.go | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/dri/download/download.go b/dri/download/download.go index 1ef1e19..4779a16 100644 --- a/dri/download/download.go +++ b/dri/download/download.go @@ -24,7 +24,11 @@ func Down(url, path, name string) bool { } defer out.Close() resp, err := http.Get(url) + if err!=nil{ + return false + } defer resp.Body.Close() + pix, err := ioutil.ReadAll(resp.Body) _, err = io.Copy(out, bytes.NewReader(pix)) if err != nil {