Skip to content

Commit

Permalink
Fix error handling of httpGet in cve-client #58
Browse files Browse the repository at this point in the history
  • Loading branch information
kotakanbe committed May 16, 2016
1 parent 4350ff2 commit 5ca8a83
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion cveapi/cve_client.go
Original file line number Diff line number Diff line change
Expand Up @@ -133,7 +133,7 @@ func (api cvedictClient) httpGet(key, url string, resChan chan<- response, errCh
f := func() (err error) {
// resp, body, errs = gorequest.New().SetDebug(config.Conf.Debug).Get(url).End()
resp, body, errs = gorequest.New().Get(url).End()
if len(errs) > 0 {
if 0 < len(errs) || resp == nil || resp.StatusCode != 200 {
return fmt.Errorf("HTTP GET error: %v, url: %s, resp: %v", errs, url, resp)
}
return nil
Expand Down

0 comments on commit 5ca8a83

Please sign in to comment.