Version: v0.36.0 Latest Latest

This package is not in the latest version of its module.

Go to latest
Published: Aug 13, 2019 License: Apache-2.0 Imports: 7 Imported by: 196




View Source
const MinPassLength = 8

MinPassLength is the minimum acceptable password length


This section is empty.


func GetCheckPassword added in v0.36.0

func GetCheckPassword(prompt, prompt2 string, buf *bufio.Reader) (string, error)

GetCheckPassword will prompt for a password twice to verify they match (for creating a new password). It enforces the password length. Only parses password once if input is piped in.

func GetConfirmation

func GetConfirmation(prompt string, buf *bufio.Reader) (bool, error)

GetConfirmation will request user give the confirmation from stdin. "y", "Y", "yes", "YES", and "Yes" all count as confirmations. If the input is not recognized, it returns false and a nil error.

func GetPassword

func GetPassword(prompt string, buf *bufio.Reader) (pass string, err error)

GetPassword will prompt for a password one-time (to sign a tx) It enforces the password length

func GetString

func GetString(prompt string, buf *bufio.Reader) (string, error)

GetString simply returns the trimmed string output of a given reader.

func PrintPrefixed added in v0.36.0

func PrintPrefixed(msg string)

PrintPrefixed prints a string with > prefixed for use in prompts.


This section is empty.

Source Files

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL