code: func (c *Client) transportForConfig(tc *TransportConfig) http.RoundTripper {
  	if inGopherJS {
  		// Calls to net.Dial* functions - which would happen if the client's transport
  		// is not nil - are prohibited with GopherJS. So we force nil here, so that the
  		// call to transportForConfig in newClient is of no consequence when on the
  		// browser.
  		return nil
  	}
  	if c == nil {
  		return nil
  	}
  	var transport http.RoundTripper
  	proxy := http.ProxyFromEnvironment
  	if tc != nil && tc.Proxy != nil {
  		proxy = tc.Proxy
  	}
  
  	if c.useHTTP2(tc) {
  		transport = &http2.Transport{
  			DialTLS: c.http2DialTLSFunc(),
  		}
  	} else {
  		transport = &http.Transport{
  			DialTLS:             c.DialTLSFunc(),
  			Dial:                c.DialFunc(),
  			Proxy:               proxy,
  			MaxIdleConnsPerHost: maxParallelHTTP_h1,
  		}
  	}
  	httpStats := &httputil.StatsTransport{
  		Transport: transport,
  	}
  	if tc != nil {
  		httpStats.VerboseLog = tc.Verbose
  	}
  	transport = httpStats
  	if android.IsChild() {
  		transport = &android.StatsTransport{transport}
  	}
  	return transport
  }
docs: // transportForConfig returns a transport for the client, setting the correct
  // Proxy, Dial, and TLSClientConfig if needed. It does not mutate c.
  // It is the caller's responsibility to then use that transport to set
  // the client's httpClient with SetHTTPClient.