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:
parent
0aaefe8cca
commit
0622019267
12
api/api.go
12
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 {
|
||||
|
|
Loading…
Reference in New Issue