From 10ab705a2c2afa9dcc2f69dbb2ba2dee949435a4 Mon Sep 17 00:00:00 2001 From: Mahmood Ali Date: Mon, 20 May 2019 11:52:51 -0400 Subject: [PATCH] remove "incidentally" exported internal function `*Config.ConfigureTLS()` is invoked internally by `NewClient` and API consumers should not invoke directly. Now that http client is created in `api.NewClient`, `*Config.ConfigureTLS` makes no sense. API consumers that call it explicitly can remove the invocation and preserve the behavior. --- api/api.go | 12 ------------ 1 file changed, 12 deletions(-) diff --git a/api/api.go b/api/api.go index 3b6b0ab7b..9a016a942 100644 --- a/api/api.go +++ b/api/api.go @@ -319,18 +319,6 @@ func cloneWithTimeout(httpClient *http.Client, t time.Duration) (*http.Client, e return &nc, nil } -// ConfigureTLS applies a set of TLS configurations to the the HTTP client. -// -// Deprecated: This method is called internally. Consider using ConfigureTLS instead. -func (c *Config) ConfigureTLS() error { - - // preserve backward behavior where ConfigureTLS pre0.9 always had a client - if c.HttpClient == nil { - c.HttpClient = defaultHttpClient() - } - return ConfigureTLS(c.HttpClient, c.TLSConfig) -} - // ConfigureTLS applies a set of TLS configurations to the the HTTP client. func ConfigureTLS(httpClient *http.Client, tlsConfig *TLSConfig) error { if tlsConfig == nil {