(url string)
| 430 | } |
| 431 | |
| 432 | func httpGet(url string) (*http.Response, error) { |
| 433 | res, err := http.Get(url) |
| 434 | if err != nil { |
| 435 | return nil, err |
| 436 | } |
| 437 | if res.StatusCode != http.StatusOK { |
| 438 | res.Body.Close() |
| 439 | return nil, fmt.Errorf("error file %q return %d code", url, res.StatusCode) |
| 440 | } |
| 441 | return res, nil |
| 442 | } |
no test coverage detected