Fix golint failures

update pull request
pull/564/head
xichengliudui 2019-02-12 07:09:42 -05:00
parent 5c780c8cb1
commit 5aa58efe07
5 changed files with 5 additions and 6 deletions

View File

@ -217,7 +217,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
@ -228,8 +227,6 @@ pkg/kubelet/types
pkg/kubelet/util
pkg/kubelet/util/cache
pkg/kubelet/util/pluginwatcher
pkg/kubelet/util/queue
pkg/kubelet/util/sliceutils
pkg/kubemark
pkg/master
pkg/master/controller/crdregistration

View File

@ -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"

View File

@ -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)

View File

@ -41,6 +41,7 @@ type basicWorkQueue struct {
var _ WorkQueue = &basicWorkQueue{}
// NewBasicWorkQueue instantiate the queue and return WorkQueue
func NewBasicWorkQueue(clock clock.Clock) WorkQueue {
queue := make(map[types.UID]time.Time)
return &basicWorkQueue{queue: queue, clock: clock}

View File

@ -21,6 +21,7 @@ import (
kubecontainer "k8s.io/kubernetes/pkg/kubelet/container"
)
// StringInSlice traversal and determine return bool
func StringInSlice(s string, list []string) bool {
for _, v := range list {
if v == s {