diff options
author | Simão Gomes Viana <[email protected]> | 2021-03-29 20:39:08 +0200 |
---|---|---|
committer | GitHub <[email protected]> | 2021-03-29 12:39:08 -0600 |
commit | 1c8ea0082822fbc13cb6b86443b908f6a068f385 (patch) | |
tree | 154befc93b40dcc4b9e5229c62fb1fbd2b7190e0 /logging.go | |
parent | d63d5ae1ceba4591f2837dff7a9e102dff7e89f2 (diff) | |
download | caddy-1c8ea0082822fbc13cb6b86443b908f6a068f385.tar.gz caddy-1c8ea0082822fbc13cb6b86443b908f6a068f385.zip |
go.mod: Migrate to golang.org/x/term (#4073)
golang.org/x/crypto/ssh/terminal is deprecated in favor of golang.org/x/term
See https://github.com/caddyserver/caddy/pull/4073/checks?check_run_id=2152150495
Error: SA1019: package golang.org/x/crypto/ssh/terminal is deprecated: this package moved to golang.org/x/term. (staticcheck)
See https://github.com/caddyserver/caddy/pull/4073/checks?check_run_id=2152228516
Error: SA1019: package golang.org/x/crypto/ssh/terminal is deprecated: this package moved to golang.org/x/term. (staticcheck)
Test: go test -count=1 './...'
Diffstat (limited to 'logging.go')
-rw-r--r-- | logging.go | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/logging.go b/logging.go index 60ca4878b..7837145da 100644 --- a/logging.go +++ b/logging.go @@ -27,7 +27,7 @@ import ( "go.uber.org/zap" "go.uber.org/zap/zapcore" - "golang.org/x/crypto/ssh/terminal" + "golang.org/x/term" ) func init() { @@ -670,7 +670,7 @@ func newDefaultProductionLog() (*defaultCustomLog, error) { func newDefaultProductionLogEncoder(colorize bool) zapcore.Encoder { encCfg := zap.NewProductionEncoderConfig() - if terminal.IsTerminal(int(os.Stdout.Fd())) { + if term.IsTerminal(int(os.Stdout.Fd())) { // if interactive terminal, make output more human-readable by default encCfg.EncodeTime = func(ts time.Time, encoder zapcore.PrimitiveArrayEncoder) { encoder.AppendString(ts.UTC().Format("2006/01/02 15:04:05.000")) |