input

package
v0.1.0 Latest Latest
Warning

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

Go to latest
Published: Nov 10, 2020 License: MIT Imports: 4 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func IsResponseYes

func IsResponseYes(mode StdinMode) (bool, error)

IsResponseYes return true when the user press 'y'.

Types

type StdinMode

type StdinMode bool

StdinMode define the behaviour of stding when entering response. Confirm: Enter must be pressed to submit response. NoConfirm: response is directly submitted, aka 1 key press.

const (
	Confirm   StdinMode = true
	NoConfirm StdinMode = false

	CurrentMode = NoConfirm
)

Jump to

Keyboard shortcuts

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