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.
This commit is contained in:
Mahmood Ali 2019-05-20 11:52:51 -04:00
parent 0aaefe8cca
commit 0622019267
1 changed files with 0 additions and 12 deletions

View File

@ -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 {