mirror of
https://github.com/outbackdingo/kubernetes.git
synced 2026-02-15 15:30:34 +00:00
apimachinery: Print unknown transport type
The current error message prints a pointer value rather than the actual
type, which is really not useful.
e.g.:
```
unknown transport type: &{0xc42044a7b0 0xc4208d6dc0}
unknown transport type: *gcp.conditionalTransport
```
This commit is contained in:
@@ -108,7 +108,7 @@ func DialerFor(transport http.RoundTripper) (DialFunc, error) {
|
||||
case RoundTripperWrapper:
|
||||
return DialerFor(transport.WrappedRoundTripper())
|
||||
default:
|
||||
return nil, fmt.Errorf("unknown transport type: %v", transport)
|
||||
return nil, fmt.Errorf("unknown transport type: %T", transport)
|
||||
}
|
||||
}
|
||||
|
||||
@@ -129,7 +129,7 @@ func TLSClientConfig(transport http.RoundTripper) (*tls.Config, error) {
|
||||
case RoundTripperWrapper:
|
||||
return TLSClientConfig(transport.WrappedRoundTripper())
|
||||
default:
|
||||
return nil, fmt.Errorf("unknown transport type: %v", transport)
|
||||
return nil, fmt.Errorf("unknown transport type: %T", transport)
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user