1
0
mirror of https://github.com/rancher/norman.git synced 2025-08-29 20:23:07 +00:00
norman/vendor/github.com/howeyc/gopass
Darren Shepherd 816c6cf363 Vendor bump
2017-11-10 21:46:33 -07:00
..
.travis.yml Vendor bump 2017-11-10 21:46:33 -07:00
LICENSE.txt Vendor bump 2017-11-10 21:46:33 -07:00
OPENSOLARIS.LICENSE Vendor bump 2017-11-10 21:46:33 -07:00
pass.go Vendor bump 2017-11-10 21:46:33 -07:00
README.md Vendor bump 2017-11-10 21:46:33 -07:00
terminal_solaris.go Vendor bump 2017-11-10 21:46:33 -07:00
terminal.go Vendor bump 2017-11-10 21:46:33 -07: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!