stdio

package
v2.1.0-rc0 Latest Latest
Warning

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

Go to latest
Published: Jul 19, 2021 License: MIT Imports: 6 Imported by: 5

Documentation

Index

Constants

View Source
const MinPasswordLen = 8

Variables

This section is empty.

Functions

This section is empty.

Types

type StdIO

type StdIO interface {
	io.Writer
	WriteErr(p []byte) (n int, err error)
	Banner(message string) error
	Error(message string) error
	InputIsInteractive() bool
	GetStringInput(prompt, defaultValue string) (string, error)
	GetSecret(prompt string, minLen int) (string, error)
	GetPassword(prompt string) (string, error)
	GetConfirm(prompt string) bool
}
var TerminalStdio StdIO = &terminalStdio{
	Stdin:  os.Stdin,
	Stdout: os.Stdout,
	Stderr: os.Stderr,
}

TerminalStdio interacts with users over stdin/stdout/stderr.

Jump to

Keyboard shortcuts

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