terminal

package
v0.1.6 Latest Latest
Warning

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

Go to latest
Published: Jan 19, 2025 License: MIT Imports: 6 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func Black

func Black(t *term.Terminal, text string) string

func Blue

func Blue(t *term.Terminal, text string) string

func Cyan

func Cyan(t *term.Terminal, text string) string

func Green

func Green(t *term.Terminal, text string) string

func Magenta

func Magenta(t *term.Terminal, text string) string

func Red

func Red(t *term.Terminal, text string) string

func White

func White(t *term.Terminal, text string) string

func Yellow

func Yellow(t *term.Terminal, text string) string

Types

type Terminal

type Terminal struct {
	Stdin  *os.File
	Stdout *os.File
	Stderr *os.File
}

func New

func New(stdin *os.File, stdout *os.File, stderr *os.File) *Terminal

func (*Terminal) Choose

func (t *Terminal) Choose(label string, chooses []util.IdName) (int, string)

func (*Terminal) ChooseString

func (t *Terminal) ChooseString(label string, chooses []string) (string, int)

func (*Terminal) Confirm

func (t *Terminal) Confirm(label string) bool

func (*Terminal) PromptInt

func (t *Terminal) PromptInt(label string, def int) (int, error)

func (*Terminal) PromptPassword

func (t *Terminal) PromptPassword(label string, def string) (string, error)

func (*Terminal) PromptString

func (t *Terminal) PromptString(label string, def string) (string, error)

func (*Terminal) PromptStringRequire

func (t *Terminal) PromptStringRequire(label string, def string) (string, error)

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL
JackTT - Gopher 🇻🇳