mirror of
				https://github.com/optim-enterprises-bv/kubernetes.git
				synced 2025-11-03 19:58:17 +00:00 
			
		
		
		
	Merge pull request #73997 from xichengliudui/fixlintcode
Fix golint failures
This commit is contained in:
		@@ -215,7 +215,6 @@ pkg/kubelet/remote
 | 
			
		||||
pkg/kubelet/secret
 | 
			
		||||
pkg/kubelet/server
 | 
			
		||||
pkg/kubelet/server/portforward
 | 
			
		||||
pkg/kubelet/server/remotecommand
 | 
			
		||||
pkg/kubelet/server/stats
 | 
			
		||||
pkg/kubelet/server/streaming
 | 
			
		||||
pkg/kubelet/stats
 | 
			
		||||
@@ -225,8 +224,6 @@ pkg/kubelet/sysctl
 | 
			
		||||
pkg/kubelet/types
 | 
			
		||||
pkg/kubelet/util
 | 
			
		||||
pkg/kubelet/util/pluginwatcher
 | 
			
		||||
pkg/kubelet/util/queue
 | 
			
		||||
pkg/kubelet/util/sliceutils
 | 
			
		||||
pkg/kubemark
 | 
			
		||||
pkg/master
 | 
			
		||||
pkg/master/controller/crdregistration
 | 
			
		||||
 
 | 
			
		||||
@@ -14,5 +14,5 @@ See the License for the specific language governing permissions and
 | 
			
		||||
limitations under the License.
 | 
			
		||||
*/
 | 
			
		||||
 | 
			
		||||
// package remotecommand contains functions related to executing commands in and attaching to pods.
 | 
			
		||||
// Package remotecommand contains functions related to executing commands in and attaching to pods.
 | 
			
		||||
package remotecommand // import "k8s.io/kubernetes/pkg/kubelet/server/remotecommand"
 | 
			
		||||
 
 | 
			
		||||
@@ -108,7 +108,7 @@ func createStreams(req *http.Request, w http.ResponseWriter, opts *Options, supp
 | 
			
		||||
	if wsstream.IsWebSocketRequest(req) {
 | 
			
		||||
		ctx, ok = createWebSocketStreams(req, w, opts, idleTimeout)
 | 
			
		||||
	} else {
 | 
			
		||||
		ctx, ok = createHttpStreamStreams(req, w, opts, supportedStreamProtocols, idleTimeout, streamCreationTimeout)
 | 
			
		||||
		ctx, ok = createHTTPStreamStreams(req, w, opts, supportedStreamProtocols, idleTimeout, streamCreationTimeout)
 | 
			
		||||
	}
 | 
			
		||||
	if !ok {
 | 
			
		||||
		return nil, false
 | 
			
		||||
@@ -122,7 +122,7 @@ func createStreams(req *http.Request, w http.ResponseWriter, opts *Options, supp
 | 
			
		||||
	return ctx, true
 | 
			
		||||
}
 | 
			
		||||
 | 
			
		||||
func createHttpStreamStreams(req *http.Request, w http.ResponseWriter, opts *Options, supportedStreamProtocols []string, idleTimeout, streamCreationTimeout time.Duration) (*context, bool) {
 | 
			
		||||
func createHTTPStreamStreams(req *http.Request, w http.ResponseWriter, opts *Options, supportedStreamProtocols []string, idleTimeout, streamCreationTimeout time.Duration) (*context, bool) {
 | 
			
		||||
	protocol, err := httpstream.Handshake(req, w, supportedStreamProtocols)
 | 
			
		||||
	if err != nil {
 | 
			
		||||
		http.Error(w, err.Error(), http.StatusBadRequest)
 | 
			
		||||
 
 | 
			
		||||
@@ -41,6 +41,7 @@ type basicWorkQueue struct {
 | 
			
		||||
 | 
			
		||||
var _ WorkQueue = &basicWorkQueue{}
 | 
			
		||||
 | 
			
		||||
// NewBasicWorkQueue returns a new basic WorkQueue with the provided clock
 | 
			
		||||
func NewBasicWorkQueue(clock clock.Clock) WorkQueue {
 | 
			
		||||
	queue := make(map[types.UID]time.Time)
 | 
			
		||||
	return &basicWorkQueue{queue: queue, clock: clock}
 | 
			
		||||
 
 | 
			
		||||
@@ -21,6 +21,7 @@ import (
 | 
			
		||||
	kubecontainer "k8s.io/kubernetes/pkg/kubelet/container"
 | 
			
		||||
)
 | 
			
		||||
 | 
			
		||||
// StringInSlice returns true if s is in list
 | 
			
		||||
func StringInSlice(s string, list []string) bool {
 | 
			
		||||
	for _, v := range list {
 | 
			
		||||
		if v == s {
 | 
			
		||||
 
 | 
			
		||||
		Reference in New Issue
	
	Block a user