act/vendor/github.com/howeyc/gopass
Casey Lee 320e9b6057
fail on error (#20)
ci-via-github-actions
2019-01-23 11:51:22 -08:00
..
.travis.yml fail on error (#20) 2019-01-23 11:51:22 -08:00
LICENSE.txt fail on error (#20) 2019-01-23 11:51:22 -08:00
OPENSOLARIS.LICENSE fail on error (#20) 2019-01-23 11:51:22 -08:00
pass.go fail on error (#20) 2019-01-23 11:51:22 -08:00
README.md fail on error (#20) 2019-01-23 11:51:22 -08:00
terminal.go fail on error (#20) 2019-01-23 11:51:22 -08:00
terminal_solaris.go fail on error (#20) 2019-01-23 11:51:22 -08:00

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!