logpolicy: migrate from x/crypto/ssh/terminal to x/term

This commit is contained in:
Brad Fitzpatrick
2020-12-09 15:28:31 -08:00
parent 57cd7738c2
commit bce865b61b
4 changed files with 7 additions and 3 deletions

View File

@@ -25,7 +25,7 @@ import (
"strings"
"time"
"golang.org/x/crypto/ssh/terminal"
"golang.org/x/term"
"tailscale.com/atomicfile"
"tailscale.com/logtail"
"tailscale.com/logtail/filch"
@@ -311,7 +311,7 @@ func tryFixLogStateLocation(dir, cmdname string) {
// given collection name.
func New(collection string) *Policy {
var lflags int
if terminal.IsTerminal(2) || runtime.GOOS == "windows" {
if term.IsTerminal(2) || runtime.GOOS == "windows" {
lflags = 0
} else {
lflags = log.LstdFlags