You set the request.URL.Host to the same hostname every time and not just the request http header. You are basically changing the url on the request made for the IP address.
Also, you should check if resp.Body is nil before calling Close on it 
You set the request.URL.Host to the same hostname every time and not just the request http header. You are basically changing the url on the request made for the IP address.
Also, you should check if resp.Body is nil before calling Close on it 