From 804c220d8f3cc71397b4ecfb8fbe2653b8e698ce Mon Sep 17 00:00:00 2001 From: Abhishek Kr Srivastav Date: Thu, 12 Sep 2024 18:15:22 +0530 Subject: [PATCH] Fix Go vet errors for master golang Co-authored-by: Rajalakshmi-Girish Co-authored-by: Abhishek Kr Srivastav Kubernetes-commit: d58b536147a6acfc6bfc6f66de2fe3af973ee88d --- rest/client_test.go | 2 +- tools/remotecommand/v4.go | 2 +- transport/cache_test.go | 2 +- 3 files changed, 3 insertions(+), 3 deletions(-) diff --git a/rest/client_test.go b/rest/client_test.go index 6ba9e738..ebb35c50 100644 --- a/rest/client_test.go +++ b/rest/client_test.go @@ -299,7 +299,7 @@ func TestHTTPProxy(t *testing.T) { })) defer testProxyServer.Close() - t.Logf(testProxyServer.URL) + t.Log(testProxyServer.URL) u, err := url.Parse(testProxyServer.URL) if err != nil { diff --git a/tools/remotecommand/v4.go b/tools/remotecommand/v4.go index 69ca934a..6146bdf1 100644 --- a/tools/remotecommand/v4.go +++ b/tools/remotecommand/v4.go @@ -115,5 +115,5 @@ func (d *errorDecoderV4) decode(message []byte) error { return errors.New("error stream protocol error: unknown error") } - return fmt.Errorf(status.Message) + return errors.New(status.Message) } diff --git a/transport/cache_test.go b/transport/cache_test.go index f2e455cc..54705276 100644 --- a/transport/cache_test.go +++ b/transport/cache_test.go @@ -159,7 +159,7 @@ func TestTLSConfigKey(t *testing.T) { shouldCacheA := valueA.Proxy == nil if shouldCacheA != canCacheA { - t.Errorf("Unexpected canCache=false for " + nameA) + t.Error("Unexpected canCache=false for " + nameA) } configIsNotEmpty := !reflect.DeepEqual(*valueA, Config{})