Fixup golang.org/x/term staticcheck warnings

Errors from staticcheck:
cmd/preferredimports/preferredimports.go:38:2:
  package golang.org/x/crypto/ssh/terminal is deprecated:
  this package moved to golang.org/x/term.  (SA1019)
vendor/k8s.io/client-go/plugin/pkg/client/auth/exec/exec.go:36:2:
  package golang.org/x/crypto/ssh/terminal is deprecated:
  this package moved to golang.org/x/term.  (SA1019)
vendor/k8s.io/client-go/tools/clientcmd/auth_loaders.go:26:2:
  package golang.org/x/crypto/ssh/terminal is deprecated:
  this package moved to golang.org/x/term.  (SA1019)

Please review the above warnings. You can test via:
  hack/verify-staticcheck.sh <failing package>
If the above warnings do not make sense, you can exempt the line or
file. See:
  https://staticcheck.io/docs/#ignoring-problems

generated:
- hack/update-internal-modules.sh
- hack/lint-dependencies.sh
- hack/update-vendor.sh

Signed-off-by: Stephen Augustus <foo@auggie.dev>

Kubernetes-commit: d9435800b65d6787beaf061546599d757b8e87c9
This commit is contained in:
Stephen Augustus
2021-03-02 00:14:47 -05:00
committed by Kubernetes Publisher
parent 768a62f124
commit b13f594878
4 changed files with 10 additions and 7 deletions

View File

@@ -33,7 +33,8 @@ import (
"time"
"github.com/davecgh/go-spew/spew"
"golang.org/x/crypto/ssh/terminal"
"golang.org/x/term"
v1 "k8s.io/apimachinery/pkg/apis/meta/v1"
"k8s.io/apimachinery/pkg/runtime"
"k8s.io/apimachinery/pkg/runtime/schema"
@@ -197,7 +198,7 @@ func newAuthenticator(c *cache, config *api.ExecConfig, cluster *clientauthentic
stdin: os.Stdin,
stderr: os.Stderr,
interactive: terminal.IsTerminal(int(os.Stdout.Fd())),
interactive: term.IsTerminal(int(os.Stdout.Fd())),
now: time.Now,
environ: os.Environ,