tmp commit

This commit is contained in:
Chris Lu
2018-07-27 01:54:45 -07:00
parent e4b7e31902
commit 0d98949199
5 changed files with 192 additions and 0 deletions

View File

@@ -83,6 +83,7 @@ func Head(url string) (http.Header, error) {
if err != nil {
return nil, err
}
defer r.Body.Close()
if r.StatusCode >= 400 {
return nil, fmt.Errorf("%s: %s", url, r.Status)
}