mirror of
https://github.com/neilalexander/yggmail.git
synced 2026-05-23 19:46:27 +03:00
Try using stdin FD instead of syscall.Stdin
This commit is contained in:
@@ -10,7 +10,6 @@ import (
|
|||||||
"os"
|
"os"
|
||||||
"strings"
|
"strings"
|
||||||
"sync"
|
"sync"
|
||||||
"syscall"
|
|
||||||
|
|
||||||
"github.com/emersion/go-sasl"
|
"github.com/emersion/go-sasl"
|
||||||
"github.com/emersion/go-smtp"
|
"github.com/emersion/go-smtp"
|
||||||
@@ -86,13 +85,13 @@ func main() {
|
|||||||
switch {
|
switch {
|
||||||
case password != nil && *password:
|
case password != nil && *password:
|
||||||
log.Println("Please enter your new password:")
|
log.Println("Please enter your new password:")
|
||||||
password1, err := term.ReadPassword(syscall.Stdin)
|
password1, err := term.ReadPassword(int(os.Stdin.Fd()))
|
||||||
if err != nil {
|
if err != nil {
|
||||||
panic(err)
|
panic(err)
|
||||||
}
|
}
|
||||||
fmt.Println()
|
fmt.Println()
|
||||||
log.Println("Please enter your new password again:")
|
log.Println("Please enter your new password again:")
|
||||||
password2, err := term.ReadPassword(syscall.Stdin)
|
password2, err := term.ReadPassword(int(os.Stdin.Fd()))
|
||||||
if err != nil {
|
if err != nil {
|
||||||
panic(err)
|
panic(err)
|
||||||
}
|
}
|
||||||
|
|||||||
Reference in New Issue
Block a user