mirror of
				https://github.com/optim-enterprises-bv/vault.git
				synced 2025-11-03 20:17:59 +00:00 
			
		
		
		
	Change variable name for clarity
This commit is contained in:
		@@ -12,7 +12,7 @@ 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