mirror of
https://github.com/optim-enterprises-bv/vault.git
synced 2025-11-01 11:08:10 +00:00
Change variable name for clarity
This commit is contained in:
@@ -11,8 +11,8 @@ import (
|
||||
)
|
||||
|
||||
var (
|
||||
errRedirect = errors.New("redirect")
|
||||
defaultHandlerSetup sync.Once
|
||||
errRedirect = errors.New("redirect")
|
||||
defaultHTTPClientSetup sync.Once
|
||||
)
|
||||
|
||||
// Config is used to configure the creation of the client.
|
||||
@@ -66,7 +66,7 @@ func NewClient(c *Config) (*Client, error) {
|
||||
}
|
||||
|
||||
if c.HttpClient == http.DefaultClient {
|
||||
defaultHandlerSetup.Do(func() {
|
||||
defaultHTTPClientSetup.Do(func() {
|
||||
// Ensure redirects are not automatically followed
|
||||
c.HttpClient.CheckRedirect = func(req *http.Request, via []*http.Request) error {
|
||||
return errRedirect
|
||||
|
||||
Reference in New Issue
Block a user