8 // transportFunc allows us to inject a mock transport for testing. We define it
9 // here so we can detect the tlsconfig and return nil for only this type.
10 type transportFunc func(*http.Request) (*http.Response, error)
12 func (tf transportFunc) RoundTrip(req *http.Request) (*http.Response, error) {
16 // resolveTLSConfig attempts to resolve the TLS configuration from the
18 func resolveTLSConfig(transport http.RoundTripper) *tls.Config {
19 switch tr := transport.(type) {
21 return tr.TLSClientConfig