modulepackage
1.0.1
Repository: https://github.com/imafish/console-format.git
Documentation: pkg.go.dev
# README
console-format
# Functions
Close terminates the library.
Init must be called before all other functions.
NextLine moves cursor to next line.
Print prints a line in the console It first move the cursor to beginning of line, then print a line that fills the entire line, and leaves the cursor at the end of the text.
Println acts similar as PrintInCurrentLine, except that it moves the cursor to the next line after printing.
PrintlnNoSuffix acts similar as PrintInCurrentLine, except that it moves the cursor to the next line after printing.
PrintNoSuffix prints a line in the console It first move the cursor to beginning of line, then print a line that fills the entire line, and leaves the cursor at the end of the text.
SetConfig configs this library.
SetStatusLine sets the status line.
SetStatusLinePrefix sets the prefix.
SetStatusLineSuffix sets the suffix.
# Constants
StatusLineBottom mode displays the status line at the bottom of the console.
StatusLineFollow mode display a status line next to the current line in console.
SuffixFixedWidth lets the suffix has a fixed length.
SuffixPercentage lets the suffix takes a certain percentage of the terminal width.
TextOverflowMultiline will display multiple lines if text is too long.
TextOverflowTrim trims the text to fit to terminal and display a trailing '..'.
# Type aliases
StatusLineMode decides where the status line is placed.
SuffixAlignMode decides how suffix is aligned.
TextOverflowMode decides what to do if text length is longer than terminal width.