1
0
mirror of https://github.com/rancher/rke.git synced 2025-06-26 15:34:53 +00:00
rke/vendor/github.com/howeyc/gopass
2017-11-06 19:40:19 +02:00
..
.travis.yml Vendor update 2017-11-06 19:40:19 +02:00
LICENSE.txt Vendor update 2017-11-06 19:40:19 +02:00
OPENSOLARIS.LICENSE Vendor update 2017-11-06 19:40:19 +02:00
pass.go Vendor update 2017-11-06 19:40:19 +02:00
README.md Vendor update 2017-11-06 19:40:19 +02:00
terminal_solaris.go Vendor update 2017-11-06 19:40:19 +02:00
terminal.go Vendor update 2017-11-06 19:40:19 +02: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!