reader

package
v0.0.1 Latest Latest
Warning

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

Go to latest
Published: Aug 7, 2018 License: MIT Imports: 9 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func CurrentDirectoryOnEmpty

func CurrentDirectoryOnEmpty(ptr *string, key string) error

CurrentDirectoryOnEmpty replaces pointer value with current directory if the value is an empty string.

func DefaultOnEmpty

func DefaultOnEmpty(def string) func(*string, string) error

DefaultOnEmpty replaces pointer value with default value if the value is an empty string.

func FailOnEmpty

func FailOnEmpty(ptr *string, key string) error

FailOnEmpty returns an error if the pointer value is an empty string.

func GeneratePasswordOnEmpty

func GeneratePasswordOnEmpty(ptr *string, key string) error

GeneratePasswordOnEmpty replaces pointer value with a newly generated password if the value is an empty string.

func ReadPassword

func ReadPassword(prompt string, ptr *string, key string, v valid) error

ReadPassword reads password into ptr from stdin - input silenced.

func ReadPasswordSubtle

func ReadPasswordSubtle(prompt string, ptr *string, key string, v valid) error

ReadPasswordSubtle reads password from stdin, but prompt goes to stderr rather than stdout.

func ReadString

func ReadString(reader *bufio.Reader, prompt string, ptr *string, key string, v valid) error

ReadString reads string into ptr from stdin.

func RetryOnEmpty

func RetryOnEmpty(ptr *string, key string) error

RetryOnEmpty returns a retryError if the value in the ptr is an empty string.

Types

This section is empty.

Jump to

Keyboard shortcuts

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