//Note: do not forget to close the returned ReadCloser
do not forget to close the returned ReadCloser
// Note : do not forget to close the returned ReadCloser
func doRequest(address string) (io.ReadCloser, error) {
	req, err := http.NewRequest(http.MethodGet, address, nil)
	if err != nil {
		return nil, err
	}
	req.Header.Add("Accept-Encoding", "gzip")
	resp, err := http.DefaultClient.Do(req)
	if err != nil {
		return nil, err
	}
	if resp.StatusCode != 200 {
		return nil, fmt.Errorf("searching failed; server returned: %s", resp.Status)
	}
	return gzip.NewReader(resp.Body)
}
func doRequest ( address string ) ( io . ReadCloser , error ) { req , err := http . NewRequest ( http . MethodGet , address , nil ) if err != nil { return nil , err } req . Header . Add ( " " , " " ) resp , err := http . DefaultClient . Do ( req ) if err != nil { return nil , err } if resp . StatusCode != 200 { return nil , fmt . Errorf ( " " , resp . Status ) } return gzip . NewReader ( resp . Body ) }
do not forget to close the returned ReadCloser
do not forget to close the returned ReadCloser