You are an expert in writing code in many different languages. Your goal is to perform code completion for the following code, keeping in mind the rest of the code and the file meta data.
    Metadata details:
    filename: hdfs_reader.go
    path of file: ./repos/poseidon/service/searcher/poseidon
    
    the code of the file until where you have to start completion: package poseidon

import (
	"bytes"
	"compress/gzip"
	"fmt"
	"io/ioutil"
	"log"
	"net/http"
	neturl "net/url"
	"time"
)

type HDFSReader struct{}

var hdfsReader = HDFSReader{}

func (self *HDFSReader) httpGet(url string, domain string, timeout int) (body []byte, err error) {
	duration := time.Duration(timeout * int(time.Millisecond))
	client := http.Client{
		Timeout: duration,
	}

	req, err := http.NewRequest("GET", url, nil)
	if len(domain) > 0 {
		req.Host = domain
	}
	resp, err := client.Do(req)

	if err != nil {
		log.Printf("httpGet error %s,url=%s", err.Error(
    
func (self *HDFSReader) httpGet(url string, domain string, timeout int) (body []byte, err error) {
	duration := time.Duration(timeout * int(time.Millisecond))
	client := http.Client{
		Timeout: duration,
	}

	req, err := http.NewRequest("GET", url, nil)
	if len(domain) > 0 {
		req.Host = domain
	}
	resp, err := client.Do(req)

	if err != nil {
		log.Printf("httpGet error %s,url=%s", err.Error(), url)
		return nil, err
	}
	defer resp.Body.Close()
	body, err = ioutil.ReadAll(resp.Body)
	if err != nil {
		log.Printf("httpGet read body error %s,url=%s", err.Error(), url)
		return nil, err
	}
	// log.Printf("httpGet code=%d,body_len=%d", resp.StatusCode, len(body))
	return body, nil
}