Update example
This commit is contained in:
@@ -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
|
||||||
}
|
}
|
||||||
|
|||||||
Reference in New Issue
Block a user