console

package
v2.0.34 Latest Latest
Warning

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

Go to latest
Published: Apr 14, 2024 License: MIT Imports: 10 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func Debugln added in v2.0.28

func Debugln(format string, a ...any)

func Errorln

func Errorln(format string, a ...any) error

func MakeDirnameAvailableValidator added in v2.0.31

func MakeDirnameAvailableValidator(parentDir string) func(string) error

func PrintSeparateln

func PrintSeparateln(format string, a ...any)

func Println

func Println(format string, a ...any)

func SetDebug added in v2.0.28

func SetDebug(debugFlag bool)

func SetUsePrettyPrompts added in v2.0.28

func SetUsePrettyPrompts(promptStylePretty bool)

Types

type Confirm added in v2.0.28

type Confirm struct {
	// contains filtered or unexported fields
}

func NewConfirm added in v2.0.28

func NewConfirm() *Confirm

func (*Confirm) Affirmative added in v2.0.28

func (c *Confirm) Affirmative(affirmative string) *Confirm

func (*Confirm) Negative added in v2.0.28

func (c *Confirm) Negative(negative string) *Confirm

func (*Confirm) Prompt added in v2.0.28

func (c *Confirm) Prompt(title string, a ...any) *Confirm

func (*Confirm) Run added in v2.0.28

func (c *Confirm) Run() bool

func (*Confirm) Title added in v2.0.28

func (c *Confirm) Title(title string) *Confirm

func (*Confirm) Value added in v2.0.28

func (c *Confirm) Value(value *bool) *Confirm

type Input

type Input struct {
	// contains filtered or unexported fields
}

func NewInput

func NewInput() *Input

func (*Input) Prompt

func (i *Input) Prompt(prompt string, a ...any) *Input

func (*Input) Run

func (i *Input) Run() error

func (*Input) Title

func (i *Input) Title(title string, a ...any) *Input

func (*Input) Validate

func (i *Input) Validate(validate func(string) error) *Input

func (*Input) Value

func (i *Input) Value(value *string) *Input

type Option

type Option[T comparable] struct {
	Title string
	Value T
}

func NewOption

func NewOption[T comparable](title string, value T) Option[T]

type Select

type Select[T comparable] struct {
	// contains filtered or unexported fields
}

func NewSelect

func NewSelect[T comparable]() *Select[T]

func (*Select[T]) Options

func (s *Select[T]) Options(optionsArray []T) *Select[T]

func (*Select[T]) Prompt

func (s *Select[T]) Prompt(prompt string, a ...any) *Select[T]

func (*Select[T]) Run

func (s *Select[T]) Run() error

func (*Select[T]) Title

func (s *Select[T]) Title(title string, a ...any) *Select[T]

func (*Select[T]) Value

func (s *Select[T]) Value(value *T) *Select[T]

Jump to

Keyboard shortcuts

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