Skip to content

Commit

Permalink
Relax typing to allow for http.RoundTripper
Browse files Browse the repository at this point in the history
  • Loading branch information
paultyng committed Feb 28, 2018
1 parent 66ff8f8 commit 344e8fc
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 3 deletions.
2 changes: 1 addition & 1 deletion registry/client.go
Original file line number Diff line number Diff line change
Expand Up @@ -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,
Expand Down
4 changes: 2 additions & 2 deletions svchost/disco/disco.go
Original file line number Diff line number Diff line change
Expand Up @@ -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 {
Expand Down

0 comments on commit 344e8fc

Please sign in to comment.