From 2a25c3a8fda1f0918fd76687561b1a9c615298b9 Mon Sep 17 00:00:00 2001 From: Jakob Unterwurzacher Date: Thu, 19 Aug 2021 07:38:56 +0200 Subject: tlog: switch from golang.org/x/crypto/ssh/terminal to golang.org/x/term $ golangci-lint run internal/tlog/log.go:13:2: SA1019: package golang.org/x/crypto/ssh/terminal is deprecated: this package moved to golang.org/x/term. (staticcheck) "golang.org/x/crypto/ssh/terminal" --- internal/tlog/log.go | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) (limited to 'internal/tlog/log.go') diff --git a/internal/tlog/log.go b/internal/tlog/log.go index 6d32a6b..5535ef3 100644 --- a/internal/tlog/log.go +++ b/internal/tlog/log.go @@ -10,7 +10,7 @@ import ( "log/syslog" "os" - "golang.org/x/crypto/ssh/terminal" + "golang.org/x/term" ) const ( @@ -106,7 +106,7 @@ var Warn *toggledLogger var Fatal *toggledLogger func init() { - if terminal.IsTerminal(int(os.Stdout.Fd())) { + if term.IsTerminal(int(os.Stdout.Fd())) { ColorReset = "\033[0m" ColorGrey = "\033[2m" ColorRed = "\033[31m" @@ -171,7 +171,7 @@ func PrintMasterkeyReminder(key []byte) { // Quiet mode return } - if !terminal.IsTerminal(int(os.Stdout.Fd())) { + if !term.IsTerminal(int(os.Stdout.Fd())) { // We don't want the master key to end up in a log file Info.Printf("Not running on a terminal, suppressing master key display\n") return -- cgit v1.2.3