From 6d1f73392f715b5017a6d89870502f136ef3e86e Mon Sep 17 00:00:00 2001 From: Kris Date: Mon, 2 Oct 2017 13:01:03 -0700 Subject: [PATCH 1/2] Version should be quoted so jq doesn't interpret it as numeric --- test/e2e/framework/nodes_util.go | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/test/e2e/framework/nodes_util.go b/test/e2e/framework/nodes_util.go index c3670be97e7..073e59dd77a 100644 --- a/test/e2e/framework/nodes_util.go +++ b/test/e2e/framework/nodes_util.go @@ -117,7 +117,7 @@ func masterUpgradeKubernetesAnywhere(v string) error { // modify config with specified k8s version if _, _, err := RunCmd("sed", "-i.bak", // writes original to .config.bak - fmt.Sprintf(`s/kubernetes_version=.*$/kubernetes_version=%s/`, v), + fmt.Sprintf(`s/kubernetes_version=.*$/kubernetes_version=%q/`, v), originalConfigPath); err != nil { return err } From fa2de842d08a7f8a7dbd21bac7fadd3ea3f8c55e Mon Sep 17 00:00:00 2001 From: tcharding Date: Tue, 3 Oct 2017 16:25:57 +1100 Subject: [PATCH 2/2] cmd: kubectl: remove golint_failures entry `.golint_failures` currently has an entry for `cmd/kubectl/app`. We can lint this package and remove the entry. There is only one `golint` warning; comment on exported function Run should be of the form "Run ..." Fix documentation comment and remove `cmd/kubectl/app` from `.golint_failures`. --- cmd/kubectl/app/kubectl.go | 2 ++ hack/.golint_failures | 1 - 2 files changed, 2 insertions(+), 1 deletion(-) diff --git a/cmd/kubectl/app/kubectl.go b/cmd/kubectl/app/kubectl.go index 7d39fd7ec72..ddcdfb9227f 100644 --- a/cmd/kubectl/app/kubectl.go +++ b/cmd/kubectl/app/kubectl.go @@ -31,6 +31,8 @@ import ( WARNING: this logic is duplicated, with minor changes, in cmd/hyperkube/kubectl.go Any salient changes here will need to be manually reflected in that file. */ + +// Run runs the kubectl program (creates and executes a new cobra command). func Run() error { logs.InitLogs() defer logs.FlushLogs() diff --git a/hack/.golint_failures b/hack/.golint_failures index afd37390f12..ead971d9b12 100644 --- a/hack/.golint_failures +++ b/hack/.golint_failures @@ -9,7 +9,6 @@ cmd/kube-proxy/app cmd/kubeadm/app cmd/kubeadm/app/apis/kubeadm cmd/kubeadm/app/apis/kubeadm/v1alpha1 -cmd/kubectl/app cmd/kubelet/app cmd/kubelet/app/options cmd/kubemark