Update example

This commit is contained in:
Michael Steinert
2015-04-10 23:36:35 -05:00
parent 8b3b6781b0
commit 9a42d39dbf

View File

@@ -21,12 +21,13 @@ package main
import ( import (
"bufio" "bufio"
"code.google.com/p/gopass"
"errors" "errors"
"fmt" "fmt"
"github.com/msteinert/pam"
"log" "log"
"os" "os"
"code.google.com/p/gopass"
"github.com/msteinert/pam"
) )
func main() { func main() {
@@ -35,9 +36,8 @@ func main() {
case pam.PromptEchoOff: case pam.PromptEchoOff:
return gopass.GetPass(msg) return gopass.GetPass(msg)
case pam.PromptEchoOn: case pam.PromptEchoOn:
fmt.Print(msg) fmt.Print(msg + " ")
bio := bufio.NewReader(os.Stdin) input, err := bufio.NewReader(os.Stdin).ReadString('\n')
input, err := bio.ReadString('\n')
if err != nil { if err != nil {
return "", err return "", err
} }