From 344e8fca05852e281a901a39d47c431eff095306 Mon Sep 17 00:00:00 2001 From: Paul Tyng Date: Wed, 28 Feb 2018 11:40:17 -0500 Subject: [PATCH] Relax typing to allow for http.RoundTripper --- registry/client.go | 2 +- svchost/disco/disco.go | 4 ++-- 2 files changed, 3 insertions(+), 3 deletions(-) diff --git a/registry/client.go b/registry/client.go index 6525c54104..f778bfa4fb 100644 --- a/registry/client.go +++ b/registry/client.go @@ -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, diff --git a/svchost/disco/disco.go b/svchost/disco/disco.go index db40463713..90f0560253 100644 --- a/svchost/disco/disco.go +++ b/svchost/disco/disco.go @@ -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 {