From d411617f9c744fd410353fca43499254fafb419d Mon Sep 17 00:00:00 2001 From: cueo Date: Sun, 20 Oct 2019 19:11:26 +0530 Subject: [PATCH 1/2] Use opposite operator --- cmd/minikube/cmd/config/prompt.go | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/cmd/minikube/cmd/config/prompt.go b/cmd/minikube/cmd/config/prompt.go index 1577afc10c..10c00a7f0f 100644 --- a/cmd/minikube/cmd/config/prompt.go +++ b/cmd/minikube/cmd/config/prompt.go @@ -151,5 +151,5 @@ func posString(slice []string, element string) int { // containsString returns true if slice contains element func containsString(slice []string, element string) bool { - return !(posString(slice, element) == -1) + return posString(slice, element) != -1 } From 6533d9f2e8ac82ae9ab6fffe1af2249081e18f6b Mon Sep 17 00:00:00 2001 From: cueo Date: Sun, 20 Oct 2019 19:11:31 +0530 Subject: [PATCH 2/2] Rename methods to match the convention --- pkg/drivers/kvm/network_test.go | 2 +- pkg/minikube/config/config_test.go | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/pkg/drivers/kvm/network_test.go b/pkg/drivers/kvm/network_test.go index 985ac7f26e..905816165a 100644 --- a/pkg/drivers/kvm/network_test.go +++ b/pkg/drivers/kvm/network_test.go @@ -46,7 +46,7 @@ var ( ]`) ) -func Test_parseStatusAndReturnIp(t *testing.T) { +func TestParseStatusAndReturnIp(t *testing.T) { type args struct { mac string statuses []byte diff --git a/pkg/minikube/config/config_test.go b/pkg/minikube/config/config_test.go index b2671628df..20334aaa54 100644 --- a/pkg/minikube/config/config_test.go +++ b/pkg/minikube/config/config_test.go @@ -174,7 +174,7 @@ func TestWriteConfig(t *testing.T) { } } -func Test_encode(t *testing.T) { +func TestEncode(t *testing.T) { var b bytes.Buffer for _, tt := range configTestCases { err := encode(&b, tt.config)