From a4d872faeebe72a5002c6d50b269b4a1f79efa6e Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Anders=20F=20Bj=C3=B6rklund?= Date: Thu, 14 May 2020 07:49:40 +0200 Subject: [PATCH] Fix some minor gofmt and golint issues So that "make gofmt" and "make golint" go green again --- cmd/minikube/cmd/start_flags.go | 2 +- pkg/generate/rewrite.go | 2 +- pkg/minikube/bootstrapper/bsutil/kverify/kverify.go | 2 +- pkg/minikube/constants/constants.go | 2 +- pkg/minikube/perf/binary.go | 1 + 5 files changed, 5 insertions(+), 4 deletions(-) diff --git a/cmd/minikube/cmd/start_flags.go b/cmd/minikube/cmd/start_flags.go index 44a212018d..59d3f8166c 100644 --- a/cmd/minikube/cmd/start_flags.go +++ b/cmd/minikube/cmd/start_flags.go @@ -353,7 +353,7 @@ func generateClusterConfig(cmd *cobra.Command, existing *config.ClusterConfig, k // updateExistingConfigFromFlags will update the existing config from the flags - used on a second start // skipping updating existing docker env , docker opt, InsecureRegistry, registryMirror, extra-config, apiserver-ips -func updateExistingConfigFromFlags(cmd *cobra.Command, existing *config.ClusterConfig) config.ClusterConfig { //nolint to supress cyclomatic complexity 45 of func `updateExistingConfigFromFlags` is high (> 30) +func updateExistingConfigFromFlags(cmd *cobra.Command, existing *config.ClusterConfig) config.ClusterConfig { //nolint to suppress cyclomatic complexity 45 of func `updateExistingConfigFromFlags` is high (> 30) validateFlags(cmd, existing.Driver) if cmd.Flags().Changed(containerRuntime) { diff --git a/pkg/generate/rewrite.go b/pkg/generate/rewrite.go index 01322e92f7..adca8d5983 100644 --- a/pkg/generate/rewrite.go +++ b/pkg/generate/rewrite.go @@ -33,7 +33,7 @@ type rewrite struct { // outputs possible drivers for the operating system func rewriteFlags(command *cobra.Command) error { rewrites := map[string][]rewrite{ - "start": []rewrite{{ + "start": {{ flag: "driver", usage: "Used to specify the driver to run Kubernetes in. The list of available drivers depends on operating system.", }, { diff --git a/pkg/minikube/bootstrapper/bsutil/kverify/kverify.go b/pkg/minikube/bootstrapper/bsutil/kverify/kverify.go index f966f0e084..1cac68a2cf 100644 --- a/pkg/minikube/bootstrapper/bsutil/kverify/kverify.go +++ b/pkg/minikube/bootstrapper/bsutil/kverify/kverify.go @@ -31,7 +31,7 @@ const ( SystemPodsWaitKey = "system_pods" // DefaultSAWaitKey is the name used in the flags for default service account DefaultSAWaitKey = "default_sa" - // AppsRunning is the name used in the flags for waiting for k8s-apps to be running + // AppsRunningKey is the name used in the flags for waiting for k8s-apps to be running AppsRunningKey = "apps_running" // NodeReadyKey is the name used in the flags for waiting for the node status to be ready NodeReadyKey = "node_ready" diff --git a/pkg/minikube/constants/constants.go b/pkg/minikube/constants/constants.go index 5bb61ad3ca..c4fc8d7e6f 100644 --- a/pkg/minikube/constants/constants.go +++ b/pkg/minikube/constants/constants.go @@ -51,7 +51,7 @@ const ( DefaultServiceCIDR = "10.96.0.0/12" // HostAlias is a DNS alias to the the container/VM host IP HostAlias = "host.minikube.internal" - // ControlPaneAlias is a DNS alias pointing to the apiserver frontend + // ControlPlaneAlias is a DNS alias pointing to the apiserver frontend ControlPlaneAlias = "control-plane.minikube.internal" // DockerHostEnv is used for docker daemon settings diff --git a/pkg/minikube/perf/binary.go b/pkg/minikube/perf/binary.go index 5fe6d7f6b9..cfafacc7da 100644 --- a/pkg/minikube/perf/binary.go +++ b/pkg/minikube/perf/binary.go @@ -29,6 +29,7 @@ import ( "k8s.io/minikube/pkg/minikube/constants" ) +// Binary holds a minikube binary type Binary struct { path string pr int