mirror of
				https://github.com/optim-enterprises-bv/kubernetes.git
				synced 2025-11-03 03:38:15 +00:00 
			
		
		
		
	Merge pull request #95614 from wilsonehusin/golint-client-go-transport
Fix golint failures in client-go/transport
This commit is contained in:
		@@ -383,7 +383,6 @@ staging/src/k8s.io/client-go/tools/leaderelection
 | 
				
			|||||||
staging/src/k8s.io/client-go/tools/leaderelection/resourcelock
 | 
					staging/src/k8s.io/client-go/tools/leaderelection/resourcelock
 | 
				
			||||||
staging/src/k8s.io/client-go/tools/record
 | 
					staging/src/k8s.io/client-go/tools/record
 | 
				
			||||||
staging/src/k8s.io/client-go/tools/reference
 | 
					staging/src/k8s.io/client-go/tools/reference
 | 
				
			||||||
staging/src/k8s.io/client-go/transport
 | 
					 | 
				
			||||||
staging/src/k8s.io/client-go/util/exec
 | 
					staging/src/k8s.io/client-go/util/exec
 | 
				
			||||||
staging/src/k8s.io/client-go/util/flowcontrol
 | 
					staging/src/k8s.io/client-go/util/flowcontrol
 | 
				
			||||||
staging/src/k8s.io/client-go/util/jsonpath
 | 
					staging/src/k8s.io/client-go/util/jsonpath
 | 
				
			||||||
 
 | 
				
			|||||||
@@ -108,7 +108,7 @@ func (c *Config) HasCertAuth() bool {
 | 
				
			|||||||
	return (len(c.TLS.CertData) != 0 || len(c.TLS.CertFile) != 0) && (len(c.TLS.KeyData) != 0 || len(c.TLS.KeyFile) != 0)
 | 
						return (len(c.TLS.CertData) != 0 || len(c.TLS.CertFile) != 0) && (len(c.TLS.KeyData) != 0 || len(c.TLS.KeyFile) != 0)
 | 
				
			||||||
}
 | 
					}
 | 
				
			||||||
 | 
					
 | 
				
			||||||
// HasCertCallbacks returns whether the configuration has certificate callback or not.
 | 
					// HasCertCallback returns whether the configuration has certificate callback or not.
 | 
				
			||||||
func (c *Config) HasCertCallback() bool {
 | 
					func (c *Config) HasCertCallback() bool {
 | 
				
			||||||
	return c.TLS.GetCert != nil
 | 
						return c.TLS.GetCert != nil
 | 
				
			||||||
}
 | 
					}
 | 
				
			||||||
 
 | 
				
			|||||||
@@ -146,6 +146,7 @@ type userAgentRoundTripper struct {
 | 
				
			|||||||
	rt    http.RoundTripper
 | 
						rt    http.RoundTripper
 | 
				
			||||||
}
 | 
					}
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					// NewUserAgentRoundTripper will add User-Agent header to a request unless it has already been set.
 | 
				
			||||||
func NewUserAgentRoundTripper(agent string, rt http.RoundTripper) http.RoundTripper {
 | 
					func NewUserAgentRoundTripper(agent string, rt http.RoundTripper) http.RoundTripper {
 | 
				
			||||||
	return &userAgentRoundTripper{agent, rt}
 | 
						return &userAgentRoundTripper{agent, rt}
 | 
				
			||||||
}
 | 
					}
 | 
				
			||||||
@@ -260,7 +261,7 @@ func NewBearerAuthRoundTripper(bearer string, rt http.RoundTripper) http.RoundTr
 | 
				
			|||||||
	return &bearerAuthRoundTripper{bearer, nil, rt}
 | 
						return &bearerAuthRoundTripper{bearer, nil, rt}
 | 
				
			||||||
}
 | 
					}
 | 
				
			||||||
 | 
					
 | 
				
			||||||
// NewBearerAuthRoundTripper adds the provided bearer token to a request
 | 
					// NewBearerAuthWithRefreshRoundTripper adds the provided bearer token to a request
 | 
				
			||||||
// unless the authorization header has already been set.
 | 
					// unless the authorization header has already been set.
 | 
				
			||||||
// If tokenFile is non-empty, it is periodically read,
 | 
					// If tokenFile is non-empty, it is periodically read,
 | 
				
			||||||
// and the last successfully read content is used as the bearer token.
 | 
					// and the last successfully read content is used as the bearer token.
 | 
				
			||||||
 
 | 
				
			|||||||
		Reference in New Issue
	
	Block a user