cosmos-sdk: Index | Files

package input

import ""


Package Files



const MinPassLength = 8

MinPassLength is the minimum acceptable password length

func GetConfirmation Uses

func GetConfirmation(prompt string, r *bufio.Reader, w io.Writer) (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 Uses

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 Uses

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

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

Package input imports 7 packages (graph) and is imported by 9 packages. Updated 2020-07-08. Refresh now. Tools for package owners.