From f20b7d511c392a361317a4df714a56f30f26e897 Mon Sep 17 00:00:00 2001 From: Jrohy Date: Sat, 10 Sep 2022 16:50:00 +0800 Subject: [PATCH] =?UTF-8?q?=E4=BF=AE=E5=A4=8D=E4=B8=8B=E8=BD=BD=E9=93=BE?= =?UTF-8?q?=E6=8E=A5=E4=B8=BA404=E6=97=B6=E4=BC=9A=E7=BB=A7=E7=BB=AD?= =?UTF-8?q?=E5=AE=89=E8=A3=85=E7=9A=84=E9=97=AE=E9=A2=98?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- utils.go | 3 +++ 1 file changed, 3 insertions(+) diff --git a/utils.go b/utils.go index 0a783a5..cb85c16 100644 --- a/utils.go +++ b/utils.go @@ -99,6 +99,9 @@ func downloadFile(url, downLoadPath string) { continue } } + if resp.StatusCode == 404 { + exit(fmt.Sprintf("%s: 404 Not Found", url)) + } if downLoadPath == "" { downLoadPath = fullPath(path.Base(url)) }