1
0
mirror of https://github.com/kubernetes-sigs/descheduler.git synced 2026-01-26 13:29:11 +01:00
Files
descheduler/vendor/github.com/howeyc/gopass
2017-07-30 18:48:49 -04:00
..
2017-07-30 18:48:49 -04:00
2017-07-30 18:48:49 -04:00
2017-07-30 18:48:49 -04:00
2017-07-30 18:48:49 -04:00
2017-07-30 18:48:49 -04:00
2017-07-30 18:48:49 -04: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!