apiserver/vendor/github.com/howeyc/gopass
Kubernetes Publisher dd002fed29 sync: resync vendor folder 2017-06-13 20:48:33 +00:00
..
.travis.yml sync: resync vendor folder 2017-02-23 11:13:21 -05:00
LICENSE.txt sync: resync vendor folder 2017-02-23 11:13:21 -05:00
OPENSOLARIS.LICENSE sync: resync vendor folder 2017-02-23 11:13:21 -05:00
README.md sync: resync vendor folder 2017-02-23 11:13:21 -05:00
pass.go sync: resync vendor folder 2017-06-13 20:48:33 +00:00
terminal.go sync: resync vendor folder 2017-02-23 11:13:21 -05:00
terminal_solaris.go sync: resync vendor folder 2017-02-23 11:13:21 -05:00

README.md

getpasswd in Go GoDoc Build Status

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!