mirror of
https://github.com/passbolt/go-passbolt-cli.git
synced 2025-05-12 02:58:20 +00:00
use golang.org/x/term instead of depricated golang.org/x/crypto/ssh/terminal
This commit is contained in:
parent
df187e8a5f
commit
a8b14c959f
1 changed files with 2 additions and 3 deletions
|
@ -14,18 +14,17 @@ import (
|
|||
"github.com/passbolt/go-passbolt/api"
|
||||
"github.com/passbolt/go-passbolt/helper"
|
||||
"github.com/spf13/viper"
|
||||
"golang.org/x/crypto/ssh/terminal"
|
||||
"golang.org/x/term"
|
||||
)
|
||||
|
||||
func readPassword() (string, error) {
|
||||
var fd int
|
||||
var pass []byte
|
||||
if terminal.IsTerminal(syscall.Stdin) {
|
||||
if term.IsTerminal(syscall.Stdin) {
|
||||
fmt.Print("Enter Password:")
|
||||
|
||||
fd = syscall.Stdin
|
||||
inputPass, err := terminal.ReadPassword(fd)
|
||||
inputPass, err := term.ReadPassword(fd)
|
||||
if err != nil {
|
||||
return "", err
|
||||
}
|
||||
|
|
Loading…
Add table
Reference in a new issue