Luther Monson 5dc1ff6e0f switch to go modules 4 years ago
..
.travis.yml 5dc1ff6e0f switch to go modules 4 years ago
LICENSE.txt c9970d0569 Allow kube subnet manager to run outside of kubernetes 7 years ago
OPENSOLARIS.LICENSE 5dc1ff6e0f switch to go modules 4 years ago
README.md 5dc1ff6e0f switch to go modules 4 years ago
pass.go c9970d0569 Allow kube subnet manager to run outside of kubernetes 7 years ago
terminal.go c9970d0569 Allow kube subnet manager to run outside of kubernetes 7 years ago
terminal_solaris.go c9970d0569 Allow kube subnet manager to run outside of kubernetes 7 years ago

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!