Documentation
¶
Index ¶
- Constants
- Variables
- func AlternativeScreenDisable(OptionsMap ...map[string]any) string
- func AlternativeScreenEnable(OptionsMap ...map[string]any) string
- func CR(OptionsMap ...map[string]any) string
- func CRLF(OptionsMap ...map[string]any) string
- func ClearLine(OptionsMap ...map[string]any) string
- func ClearScreen(OptionsMap ...map[string]any) string
- func ClearScrollbackBuffer(OptionsMap ...map[string]any) string
- func ClearWindow(OptionsMap ...map[string]any) string
- func Colour(effectValue byte, Background ...bool) string
- func Colour256(colourValue byte, Background ...bool) string
- func ColourRGB(R, G, B byte, Background ...bool) string
- func CursorDown(n int, OptionsMap ...map[string]any) string
- func CursorHide(OptionsMap ...map[string]any) string
- func CursorHome(OptionsMap ...map[string]any) string
- func CursorLeft(n int, OptionsMap ...map[string]any) string
- func CursorMove(row int, col int, OptionsMap ...map[string]any) string
- func CursorRestore(OptionsMap ...map[string]any) string
- func CursorRight(n int, OptionsMap ...map[string]any) string
- func CursorRowCol() (int, int, error)
- func CursorSave(OptionsMap ...map[string]any) string
- func CursorShow(OptionsMap ...map[string]any) string
- func CursorUp(n int, OptionsMap ...map[string]any) string
- func Effect(effectValue byte) string
- func EscapeString(outputString string) string
- func LF(OptionsMap ...map[string]any) string
- func Render(outputString string, OptionsMap ...map[string]any) string
- func RenderTable(rows [][]string, OptionsMap ...map[string]any) string
- func RenderWindow(rows []string, OptionsMap ...map[string]any) string
- func Reset(OptionsMap ...map[string]any) string
- func RuneCount(outputString string) int
- func ScrollDown(n int, OptionsMap ...map[string]any) string
- func ScrollUp(n int, OptionsMap ...map[string]any) string
- func TabwriterTable(rows [][]string, OptionsMap ...map[string]any) string
- func TermSize(FD ...int) (width, height int, err error)
- func TruncateString(outputString string, maxWidth int) string
- type BorderStyle
- type Options
Constants ¶
View Source
const ( Black = 30 Red = 31 Green = 32 Yellow = 33 Blue = 34 Magenta = 35 Cyan = 36 White = 37 Default = 39 BrightBlack = 90 BrightRed = 91 BrightGreen = 92 BrightYellow = 93 BrightBlue = 94 BrightMagenta = 95 BrightCyan = 96 BrightWhite = 97 BrightDefault = 99 Bold = 1 Dim = 2 Underline = 4 Blink = 5 Reverse = 7 Hide = 8 BoldOff = 21 DimOff = 22 UnderlineOff = 24 BlinkOff = 25 ReverseOff = 27 HideOff = 28 )
Variables ¶
View Source
var AsciiBorderStyle = BorderStyle{
Horizontal: "-",
Vertical: "|",
TopLeft: "+",
TopRight: "+",
BottomLeft: "+",
BottomRight: "+",
InnerLeft: "+",
InnerRight: "+",
TopMiddle: "+",
InnerMiddle: "+",
BottomMiddle: "+",
}
View Source
var DefaultOptions = Options{BorderStyle: UnicodeBorderStyle, Border: true, TabWidth: 2}
View Source
var UnicodeBorderStyle = BorderStyle{
Horizontal: "\u2500",
Vertical: "\u2502",
TopLeft: "\u250C",
TopRight: "\u2510",
BottomLeft: "\u2514",
BottomRight: "\u2518",
InnerLeft: "\u251C",
InnerRight: "\u2524",
TopMiddle: "\u252C",
InnerMiddle: "\u253C",
BottomMiddle: "\u2534",
}
Functions ¶
func AlternativeScreenDisable ¶
Disable Alternative Screen
func AlternativeScreenEnable ¶
Enable Alternative Screen
func ClearScreen ¶
Clear screen and scrollback buffer
func ClearScrollbackBuffer ¶
func ClearWindow ¶
clear visible screen only (not scrollback buffer)
func CursorHide ¶
func CursorHome ¶
func CursorRestore ¶
func CursorRowCol ¶
func CursorSave ¶
func CursorShow ¶
func EscapeString ¶
func TruncateString ¶
Types ¶
type BorderStyle ¶
Click to show internal directories.
Click to hide internal directories.