Update example code
This commit is contained in:
@@ -26,7 +26,7 @@ import (
|
|||||||
"log"
|
"log"
|
||||||
"os"
|
"os"
|
||||||
|
|
||||||
"code.google.com/p/gopass"
|
"github.com/bgentry/speakeasy"
|
||||||
"github.com/msteinert/pam"
|
"github.com/msteinert/pam"
|
||||||
)
|
)
|
||||||
|
|
||||||
@@ -34,7 +34,7 @@ func main() {
|
|||||||
t, err := pam.StartFunc("", "", func(s pam.Style, msg string) (string, error) {
|
t, err := pam.StartFunc("", "", func(s pam.Style, msg string) (string, error) {
|
||||||
switch s {
|
switch s {
|
||||||
case pam.PromptEchoOff:
|
case pam.PromptEchoOff:
|
||||||
return gopass.GetPass(msg)
|
return speakeasy.Ask(msg)
|
||||||
case pam.PromptEchoOn:
|
case pam.PromptEchoOn:
|
||||||
fmt.Print(msg + " ")
|
fmt.Print(msg + " ")
|
||||||
input, err := bufio.NewReader(os.Stdin).ReadString('\n')
|
input, err := bufio.NewReader(os.Stdin).ReadString('\n')
|
||||||
|
|||||||
Reference in New Issue
Block a user