From 3e60fcda8efe6e4a3e818984ccdf3262980a6d01 Mon Sep 17 00:00:00 2001 From: "deepsource-autofix[bot]" <62050782+deepsource-autofix[bot]@users.noreply.github.com> Date: Tue, 26 Oct 2021 19:24:08 +0000 Subject: [PATCH] Fix check for empty string --- pkg/k8sutil/portforward.go | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/pkg/k8sutil/portforward.go b/pkg/k8sutil/portforward.go index f7ad7148..bbab72f9 100644 --- a/pkg/k8sutil/portforward.go +++ b/pkg/k8sutil/portforward.go @@ -35,9 +35,9 @@ func PortForward(config *restclient.Config, localPort int, remotePort int, names go func() { for range readyChan { // Kubernetes will close this channel when it has something to tell us. } - if len(errOut.String()) != 0 { + if errOut.String() != "" { panic(errOut.String()) - } else if len(out.String()) != 0 { + } else if out.String() != "" { // fmt.Println(out.String()) } }()