title: golang force http request to specific ip (similar to curl --resolve)
body: <p>How can I force a golang https get request to use a specific IP address.  I want to skip DNS resolution and provide the IP myself.  The equivalent in curl would be a --resolve as illustrated below.</p>
  
  <p>curl <a href="https://domain.com/dir/filename" rel="noreferrer">https://domain.com/dir/filename</a> --resolve "domain.com:443:10.10.10.10"</p>
  
  <p>Since this is ssl I want to avoid substituting in the IP for the domain as in the following example.</p>
  
  <p>curl <a href="https://10.10.10.10/dir/filename" rel="noreferrer">https://10.10.10.10/dir/filename</a> --header "Host: domain.com"</p>