![mozhulee](/assets/img/avatar_default.png)
Change-Id: Ifa8cc0e4abb798c63c9d4ac9297e3e32443125e4 Implements: blueprint auth-controller-framework Signed-off-by: mozhuli <21621232@zju.edu.cn>
716 B
716 B
getpasswd in Go
![Build Status](https://secure.travis-ci.org/howeyc/gopass.png?branch=master)
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!