multus-cni/vendor/github.com/howeyc/gopass
2017-06-29 17:15:54 +01:00
..
.travis.yml adding the glide Vendor Package Management support 2017-06-29 17:15:54 +01:00
LICENSE.txt adding the glide Vendor Package Management support 2017-06-29 17:15:54 +01:00
OPENSOLARIS.LICENSE adding the glide Vendor Package Management support 2017-06-29 17:15:54 +01:00
pass_test.go adding the glide Vendor Package Management support 2017-06-29 17:15:54 +01:00
pass.go adding the glide Vendor Package Management support 2017-06-29 17:15:54 +01:00
README.md adding the glide Vendor Package Management support 2017-06-29 17:15:54 +01:00
terminal_solaris.go adding the glide Vendor Package Management support 2017-06-29 17:15:54 +01:00
terminal.go adding the glide Vendor Package Management support 2017-06-29 17:15:54 +01: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!