Relax typing to allow for http.RoundTripper

This commit is contained in:
Paul Tyng 2018-02-28 11:40:17 -05:00
parent 66ff8f8bed
commit 344e8fca05
No known key found for this signature in database
GPG Key ID: E518875D6C65835A
2 changed files with 3 additions and 3 deletions

View File

@ -55,7 +55,7 @@ func NewClient(services *disco.Disco, creds auth.CredentialsSource, client *http
client.Timeout = requestTimeout
}
services.Transport = client.Transport.(*http.Transport)
services.Transport = client.Transport
return &Client{
client: client,

View File

@ -40,9 +40,9 @@ type Disco struct {
hostCache map[svchost.Hostname]Host
credsSrc auth.CredentialsSource
// Transport is a custom http.Transport to use.
// Transport is a custom http.RoundTripper to use.
// A package default is used if this is nil.
Transport *http.Transport
Transport http.RoundTripper
}
func NewDisco() *Disco {