mirror of
https://github.com/avelino/awesome-go.git
synced 2024-11-07 16:33:40 +00:00
handle error
This commit is contained in:
parent
5a7a10e3f4
commit
105035402b
@ -177,7 +177,10 @@ func testRepoState(toRun bool, href string, client *http.Client, staleRepos *[]s
|
|||||||
defer resp.Body.Close()
|
defer resp.Body.Close()
|
||||||
|
|
||||||
var repoResp repo
|
var repoResp repo
|
||||||
json.NewDecoder(resp.Body).Decode(&repoResp)
|
if err := json.NewDecoder(resp.Body).Decode(&repoResp); err != nil {
|
||||||
|
return false
|
||||||
|
}
|
||||||
|
|
||||||
isRepoAdded := false
|
isRepoAdded := false
|
||||||
|
|
||||||
if resp.StatusCode == http.StatusMovedPermanently {
|
if resp.StatusCode == http.StatusMovedPermanently {
|
||||||
|
Loading…
Reference in New Issue
Block a user