fix compile error

Signed-off-by: Ahmet Alp Balkan <ahmetb@google.com>
This commit is contained in:
Ahmet Alp Balkan 2020-04-29 12:16:26 -07:00
parent 4bbe0fad79
commit 52bbf5c786
No known key found for this signature in database
GPG Key ID: 441833503E604E2C

View File

@ -8,7 +8,6 @@ import (
"os/exec" "os/exec"
"strings" "strings"
"github.com/fatih/color"
"github.com/pkg/errors" "github.com/pkg/errors"
"github.com/ahmetb/kubectx/internal/cmdutil" "github.com/ahmetb/kubectx/internal/cmdutil"
@ -39,7 +38,6 @@ func (op ListOp) Run(stdout, stderr io.Writer) error {
return errors.Wrap(err, "could not list namespaces (is the cluster accessible?)") return errors.Wrap(err, "could not list namespaces (is the cluster accessible?)")
} }
for _, c := range ns { for _, c := range ns {
s := c s := c
if c == curNs { if c == curNs {
@ -59,9 +57,9 @@ func findKubectl() (string, error) {
} }
func queryNamespaces() ([]string, error) { func queryNamespaces() ([]string, error) {
kubectl ,err := findKubectl() kubectl, err := findKubectl()
if err != nil { if err != nil {
return nil ,err return nil, err
} }
// TODO add a log message to user if kubectl is taking >1s // TODO add a log message to user if kubectl is taking >1s