func doPoolTest(client Client) error {
	testURL, err := url.Parse("http://127.0.0.1:8080/")
	if err != nil {
		return err
	}

	var doFunc func(req *http.Request) (*http.Response, error)

	switch cp := client.(type) {
	case *PClient:
		doFunc = cp.DoPool
	case *http.Client:
		doFunc = cp.Do
	}

	resp, err := doFunc(&http.Request{URL: testURL})
	if err != nil {
		return err
	}

	_, err = ioutil.ReadAll(resp.Body)
	resp.Body.Close()

	return nil
}
// doPoolTest is the workhorse testing function
doPoolTest is the workhorse testing function
// doPoolTest is the workhorse testing function
func doPoolTest(client Client) error {
	testURL, err := url.Parse("http://127.0.0.1:8080/")
	if err != nil {
		return err
	}
	var doFunc func(req *http.Request) (*http.Response, error)
	switch cp := client.(type) {
	case *PClient:
		doFunc = cp.DoPool
	case *http.Client:
		doFunc = cp.Do
	}
	resp, err := doFunc(&http.Request{URL: testURL})
	if err != nil {
		return err
	}
	_, err = ioutil.ReadAll(resp.Body)
	resp.Body.Close()
	return nil
}
func doPoolTest ( client Client ) error { testURL , err := url . Parse ( " " ) if err != nil { return err } var doFunc func ( req * http . Request ) ( * http . Response , error ) switch cp := client . ( type ) { case * PClient : doFunc = cp . DoPool case * http . Client : doFunc = cp . Do } resp , err := doFunc ( & http . Request { URL : testURL } ) if err != nil { return err } _ , err = ioutil . ReadAll ( resp . Body ) resp . Body . Close ( ) return nil }
doPoolTest is the workhorse testing function
doPoolTest is the workhorse testing function