"rsync for cloud storage" - Google Drive, S3, Dropbox, Backblaze B2, One Drive, Swift, Hubic, Wasabi, Google Cloud Storage, Azure Blob, Azure Files, Yandex Files
Go azure-blobazure-blob-storageazure-filesbackblaze-b2cloud-storagedropboxencryptionftpfuse-filesystemgogolanggoogle-cloud-storagegoogle-driveonedriveopenstack-swiftrclones3sftpsyncwebdav
fs/config, lib/terminal: use golang.org/x/term
Tobias Klauser54c9c3156ced
diff --git a/fs/config/config_read_password.go b/fs/config/config_read_password.goindex c1a0f4992..2ea907372 100644--- a/fs/config/config_read_password.go+++ b/fs/config/config_read_password.go@@ -1,9 +1,8 @@-// ReadPassword for OSes which are supported by golang.org/x/crypto/ssh/terminal+// ReadPassword for OSes which are supported by golang.org/x/term// See https://github.com/golang/go/issues/14441 - plan9-// https://github.com/golang/go/issues/13085 - solaris-//go:build !solaris && !plan9-// +build !solaris,!plan9+//go:build !plan9+// +build !plan9package configdiff --git a/fs/config/config_read_password_unsupported.go b/fs/config/config_read_password_unsupported.goindex 5a48643ef..364da802b 100644--- a/fs/config/config_read_password_unsupported.go+++ b/fs/config/config_read_password_unsupported.go@@ -1,9 +1,8 @@-// ReadPassword for OSes which are not supported by golang.org/x/crypto/ssh/terminal+// ReadPassword for OSes which are not supported by golang.org/x/term// See https://github.com/golang/go/issues/14441 - plan9-// https://github.com/golang/go/issues/13085 - solaris-//go:build solaris || plan9-// +build solaris plan9+//go:build plan9+// +build plan9package configdiff --git a/go.mod b/go.modindex e542f2fa7..8aaa80cf8 100644--- a/go.mod+++ b/go.mod@@ -64,6 +64,7 @@ require (golang.org/x/oauth2 v0.0.0-20211104180415-d3ed0bb246c8golang.org/x/sync v0.0.0-20210220032951-036812b2e83cgolang.org/x/sys v0.0.0-20211216021012-1d35b9e2eb4e+ golang.org/x/term v0.0.0-20210927222741-03fcf44c2211golang.org/x/text v0.3.7golang.org/x/time v0.0.0-20210723032227-1f47c861a9acgoogle.golang.org/api v0.60.0@@ -117,7 +118,6 @@ require (github.com/vivint/infectious v0.0.0-20200605153912-25a574ae18a3 // indirectgithub.com/zeebo/errs v1.2.2 // indirectgo.opencensus.io v0.23.0 // indirect- golang.org/x/term v0.0.0-20210927222741-03fcf44c2211 // indirectgoogle.golang.org/appengine v1.6.7 // indirectgoogle.golang.org/genproto v0.0.0-20211104193956-4c6863e31247 // indirectgoogle.golang.org/grpc v1.42.0 // indirectdiff --git a/lib/terminal/terminal_normal.go b/lib/terminal/terminal_normal.goindex 474716275..f84affbaa 100644--- a/lib/terminal/terminal_normal.go+++ b/lib/terminal/terminal_normal.go@@ -7,13 +7,13 @@ import ("fmt""os"- "golang.org/x/crypto/ssh/terminal"+ "golang.org/x/term")// GetSize reads the dimensions of the current terminal or returns a// sensible defaultfunc GetSize() (w, h int) {- w, h, err := terminal.GetSize(int(os.Stdout.Fd()))+ w, h, err := term.GetSize(int(os.Stdout.Fd()))if err != nil {w, h = 80, 25}@@ -22,14 +22,14 @@ func GetSize() (w, h int) {// IsTerminal returns whether the fd passed in is a terminal or notfunc IsTerminal(fd int) bool {- return terminal.IsTerminal(fd)+ return term.IsTerminal(fd)}// ReadPassword reads a line of input from a terminal without local echo. This// is commonly used for inputting passwords and other sensitive data. The slice// returned does not include the \n.func ReadPassword(fd int) ([]byte, error) {- return terminal.ReadPassword(fd)+ return term.ReadPassword(fd)}// WriteTerminalTitle writes a string to the terminal title