xterm

package
v0.3.9 Latest Latest
Warning

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

Go to latest
Published: Apr 18, 2024 License: MIT Imports: 9 Imported by: 2

Documentation

Index

Constants

View Source
const (
	ESC_REDBRT = "\033[31;1m"
	ESC_BRIGHT = "\033[1m"
	ESC_RESET  = "\033[0m"
)

Variables

This section is empty.

Functions

This section is empty.

Types

type Console

type Console struct {
	Prompt string
	Trials int
	// contains filtered or unexported fields
}

func NewConsole

func NewConsole() *Console

func (*Console) ConfirmValue

func (con *Console) ConfirmValue(msg, chkval string) error

confirm imput value

func (*Console) Hidden

func (con *Console) Hidden() *Console

set hidden flag for current operation

func (*Console) ReadDecimal

func (con *Console) ReadDecimal(
	msg string, decimals int, defval any) (float64, error)

read numeric decimal value

func (*Console) ReadDecimalWLimit

func (con *Console) ReadDecimalWLimit(msg string, decimals int,
	defval any, vmin, vmax float64) (float64, error)

func (*Console) ReadNumber

func (con *Console) ReadNumber(msg string, defval any) (int64, error)

read numeric integer value

func (*Console) ReadNumberWLimit

func (con *Console) ReadNumberWLimit(
	msg string, defval any, vmin, vmax int64) (int64, error)

func (*Console) ReadValue

func (con *Console) ReadValue(msg string, defval any) (string, error)

read general string value

func (*Console) Regex

func (con *Console) Regex(regex string) *Console

set regex validator for current operation

func (*Console) Required

func (con *Console) Required() *Console

set required flag for current operation

func (*Console) SelectValue

func (con *Console) SelectValue(
	msg string, values []string, defval any) (string, error)

select string value from certain values

func (*Console) SelectYesNo

func (con *Console) SelectYesNo(msg string, defval any) (bool, error)

Jump to

Keyboard shortcuts

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