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