cli

package
v0.0.0-...-90c307c Latest Latest
Warning

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

Go to latest
Published: May 28, 2024 License: MIT Imports: 5 Imported by: 0

Documentation

Index

Constants

View Source
const (
	InputRow    = 29
	MaxInputLen = 118
)

Variables

Functions

func Clear

func Clear()

func ClearConsole

func ClearConsole()

func Colorize

func Colorize(str string, c Color) string

func MoveTo

func MoveTo(row int, column ...int)

func MoveToInput

func MoveToInput()

func PrintInputFrame

func PrintInputFrame()

func RestoreCursor

func RestoreCursor()

func SafePrintf

func SafePrintf(printLn *int, format string, a ...any)

func SaveCursor

func SaveCursor()

func Scan

func Scan(scanner *bufio.Scanner) (string, int)

Types

type Color

type Color string
const (
	Reset          = "\x1b[0m"
	Red      Color = "\x1b[31m"
	Green    Color = "\x1b[32m"
	Yellow   Color = "\x1b[33m"
	Blue     Color = "\x1b[34m"
	Magenta  Color = "\x1b[35m"
	Cyan     Color = "\x1b[36m"
	GrayS    Color = "\x1b[90m"
	RedS     Color = "\x1b[91m"
	GreenS   Color = "\x1b[92m"
	YellowS  Color = "\x1b[93m"
	BlueS    Color = "\x1b[94m"
	MagentaS Color = "\x1b[95m"
	CyanS    Color = "\x1b[96m"
	WhiteS   Color = "\x1b[97m"
)

func RandColor

func RandColor() Color

Jump to

Keyboard shortcuts

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