termui

package
v1.3.8 Latest Latest
Warning

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

Go to latest
Published: Aug 17, 2022 License: MIT Imports: 14 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func Apply

func Apply(elements *list.List, fn ElementFunc) (err error)

func ApplyOrdered

func ApplyOrdered(elements *list.List, fn ElementFunc) (err error)

func GetConfirmedPassword

func GetConfirmedPassword() []byte

func GetPassword

func GetPassword() []byte

func HasArgs

func HasArgs(args []string, length int) bool

func OpenDefault

func OpenDefault(fileOrURL string) error

OpenDefault opens the specified file or URL with the default associated application.

You may use it to open a web site:

OpenDefault("https://google.com")

Or open a file:

OpenDefault("/home/bob/story.txt")

Or open a folder in your default file manager:

OpenDefault("/home/bob")

func Printf

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

func Println

func Println(a ...any)

func ShortPath

func ShortPath(path string) string

func ShowError

func ShowError(err error)

func TerminalWidth

func TerminalWidth() int

TerminalWidth Returns the width of the terminal window. Defaults to 80 if the width cannot be determined.

func ValidatePassword

func ValidatePassword(password1 []byte, password2 []byte) bool

Types

type ElementFunc

type ElementFunc func(v any) error

Directories

Path Synopsis
Package color is an ANSI color package to output colorized or SGR defined output to the standard output.
Package color is an ANSI color package to output colorized or SGR defined output to the standard output.
Package isatty implements interface to isatty
Package isatty implements interface to isatty
Package liner implements a simple command line editor, inspired by linenoise (https://github.com/antirez/linenoise/).
Package liner implements a simple command line editor, inspired by linenoise (https://github.com/antirez/linenoise/).
Create & Generate text based table
Create & Generate text based table

Jump to

Keyboard shortcuts

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