![]() |
há 4 anos atrás | |
---|---|---|
.. | ||
.travis.yml | há 4 anos atrás | |
LICENSE.txt | há 7 anos atrás | |
OPENSOLARIS.LICENSE | há 4 anos atrás | |
README.md | há 4 anos atrás | |
pass.go | há 7 anos atrás | |
terminal.go | há 7 anos atrás | |
terminal_solaris.go | há 7 anos atrás |
Retrieve password from user terminal or piped input without echo.
Verified on BSD, Linux, and Windows.
Example:
package main
import "fmt"
import "github.com/howeyc/gopass"
func main() {
fmt.Printf("Password: ")
// Silent. For printing *'s use gopass.GetPasswdMasked()
pass, err := gopass.GetPasswd()
if err != nil {
// Handle gopass.ErrInterrupted or getch() read error
}
// Do something with pass
}
Caution: Multi-byte characters not supported!