1
0
mirror of https://github.com/aclindsa/ofxgo.git synced 2025-06-22 16:38:38 -04:00

Replace github.com/howeyc/gopass with golang.org/x/term

gopass is no longer maintained, and the suggested replacement for
getting passwords from terminals is x/term.
This commit is contained in:
2021-10-17 21:01:28 -04:00
parent a4a166aa74
commit e1a72fcd54
3 changed files with 8 additions and 16 deletions

View File

@ -3,7 +3,8 @@ package main
import (
"flag"
"fmt"
"github.com/howeyc/gopass"
"golang.org/x/term"
"os"
)
type command struct {
@ -55,7 +56,7 @@ func checkServerFlags() bool {
if ret && len(password) == 0 {
fmt.Printf("Password for %s: ", username)
pass, err := gopass.GetPasswd()
pass, err := term.ReadPassword(int(os.Stdin.Fd()))
if err != nil {
fmt.Printf("Error reading password: %s\n", err)
ret = false