term

package
v0.9.2 Latest Latest
Warning

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

Go to latest
Published: Dec 16, 2024 License: MIT Imports: 2 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func Blue added in v0.8.1

func Blue(msg string) string

Blue returns a blue colored string for terminal output.

func BoldOff

func BoldOff()

func BoldOn

func BoldOn()

func ClearLine

func ClearLine()

func ClearScreen

func ClearScreen()

func Confirm added in v0.9.2

func Confirm(raw Raw, prompt string) (value bool)

Confirm asks the user for a yes or no answer.

func Cyan

func Cyan(msg string) string

Cyan returns a cyan colored string for terminal output.

func Dim

func Dim(msg string) string

Dim returns a grey colored string for terminal output.

func Green

func Green(msg string) string

Green returns a green colored string for terminal output.

func HideCursor

func HideCursor()

func Input added in v0.9.2

func Input(raw Raw, prompt string, defaultValue string) (value string)

Input asks the user for a string input.

func Magenta

func Magenta(msg string) string

Magenta returns a magenta colored string for terminal output.

func MoveCursorDown

func MoveCursorDown(n int)

func MoveCursorLeft

func MoveCursorLeft(n int)

func MoveCursorRight

func MoveCursorRight(n int)

func MoveCursorTo added in v0.8.1

func MoveCursorTo(x, y int)

func MoveCursorUp

func MoveCursorUp(n int)

func Red

func Red(msg string) string

Red returns a red colored string for terminal output.

func RestoreCursor added in v0.8.1

func RestoreCursor()

func SaveCursor added in v0.8.1

func SaveCursor()

func Select added in v0.9.2

func Select(raw Raw, prompt string, items []string) (selected string)

Select asks the user to select an item from a list.

func ShowCursor

func ShowCursor()

func UnderlineOff

func UnderlineOff()

func UnderlineOn

func UnderlineOn()

func Yellow

func Yellow(msg string) string

Yellow returns a yellow colored string for terminal output.

Types

type Raw added in v0.9.2

type Raw interface {
	Next() byte
	Close()
}

Raw is an interface for reading raw input.

Jump to

Keyboard shortcuts

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