mirror of https://github.com/k3s-io/k3s
Merge pull request #77793 from SataQiu/fix-golint-client-go-20190513
Fix golint failures of client-go/tools/auth client-go/tools/portforwardk3s-v1.15.3
commit
5666982b27
|
@ -537,7 +537,6 @@ staging/src/k8s.io/client-go/scale/scheme/autoscalingv1
|
|||
staging/src/k8s.io/client-go/scale/scheme/extensionsv1beta1
|
||||
staging/src/k8s.io/client-go/scale/scheme/extensionsv1beta1
|
||||
staging/src/k8s.io/client-go/testing
|
||||
staging/src/k8s.io/client-go/tools/auth
|
||||
staging/src/k8s.io/client-go/tools/cache
|
||||
staging/src/k8s.io/client-go/tools/cache/testing
|
||||
staging/src/k8s.io/client-go/tools/clientcmd
|
||||
|
@ -546,7 +545,6 @@ staging/src/k8s.io/client-go/tools/clientcmd/api/latest
|
|||
staging/src/k8s.io/client-go/tools/clientcmd/api/v1
|
||||
staging/src/k8s.io/client-go/tools/leaderelection
|
||||
staging/src/k8s.io/client-go/tools/leaderelection/resourcelock
|
||||
staging/src/k8s.io/client-go/tools/portforward
|
||||
staging/src/k8s.io/client-go/tools/record
|
||||
staging/src/k8s.io/client-go/tools/reference
|
||||
staging/src/k8s.io/client-go/transport
|
||||
|
|
|
@ -105,7 +105,7 @@ func LoadFromFile(path string) (*Info, error) {
|
|||
// The fields of client.Config with a corresponding field in the Info are set
|
||||
// with the value from the Info.
|
||||
func (info Info) MergeWithConfig(c restclient.Config) (restclient.Config, error) {
|
||||
var config restclient.Config = c
|
||||
var config = c
|
||||
config.Username = info.User
|
||||
config.Password = info.Password
|
||||
config.CAFile = info.CAFile
|
||||
|
@ -118,6 +118,7 @@ func (info Info) MergeWithConfig(c restclient.Config) (restclient.Config, error)
|
|||
return config, nil
|
||||
}
|
||||
|
||||
// Complete returns true if the Kubernetes API authorization info is complete.
|
||||
func (info Info) Complete() bool {
|
||||
return len(info.User) > 0 ||
|
||||
len(info.CertFile) > 0 ||
|
||||
|
|
|
@ -33,8 +33,8 @@ import (
|
|||
"k8s.io/apimachinery/pkg/util/runtime"
|
||||
)
|
||||
|
||||
// PortForwardProtocolV1Name is the subprotocol used for port forwarding.
|
||||
// TODO move to API machinery and re-unify with kubelet/server/portfoward
|
||||
// The subprotocol "portforward.k8s.io" is used for port forwarding.
|
||||
const PortForwardProtocolV1Name = "portforward.k8s.io"
|
||||
|
||||
// PortForwarder knows how to listen for local connections and forward them to
|
||||
|
@ -401,6 +401,7 @@ func (pf *PortForwarder) handleConnection(conn net.Conn, port ForwardedPort) {
|
|||
}
|
||||
}
|
||||
|
||||
// Close stops all listeners of PortForwarder.
|
||||
func (pf *PortForwarder) Close() {
|
||||
// stop all listeners
|
||||
for _, l := range pf.listeners {
|
||||
|
|
Loading…
Reference in New Issue