`client.Transport` is `http.Client.Transport` just has `RoundTripper()`. Not `http.Transport`. So we cannot convert it here.
For a mock test, I can play with this https://play.golang.org/p/gs7_QrL9-Y
Signed-off-by: wrfly <mr.wrfly@gmail.com>
| ... | ... |
@@ -165,7 +165,7 @@ func NewClient(host string, version string, client *http.Client, httpHeaders map |
| 165 | 165 |
} |
| 166 | 166 |
|
| 167 | 167 |
if client != nil {
|
| 168 |
- if _, ok := client.Transport.(*http.Transport); !ok {
|
|
| 168 |
+ if _, ok := client.Transport.(http.RoundTripper); !ok {
|
|
| 169 | 169 |
return nil, fmt.Errorf("unable to verify TLS configuration, invalid transport %v", client.Transport)
|
| 170 | 170 |
} |
| 171 | 171 |
} else {
|