Skip to content

Commit

Permalink
remove "incidentally" exported internal function
Browse files Browse the repository at this point in the history
`*Config.ConfigureLTS()` 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.
  • Loading branch information
Mahmood Ali committed May 20, 2019
1 parent cbc1555 commit f4bf14a
Showing 1 changed file with 0 additions and 12 deletions.
12 changes: 0 additions & 12 deletions api/api.go
Original file line number Diff line number Diff line change
Expand Up @@ -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 {
Expand Down

0 comments on commit f4bf14a

Please sign in to comment.