terminal

package
v1.6.6 Latest Latest
Warning

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

Go to latest
Published: Oct 27, 2023 License: Unlicense Imports: 5 Imported by: 3

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func Clear

func Clear()

Clear current terminal screen (keeps scroll buffer intact)

func ClearLine

func ClearLine()

ClearLine removes all content from the current line and moves the cursor to the beginning of the line

func HideCursor

func HideCursor()

HideCursor hides the cursor

func MoveCursorDown

func MoveCursorDown(rows int)

MoveCursorDown moves the cursor down by the given number of rows

func MoveCursorTo

func MoveCursorTo(column int, row int)

MoveCursorTo moves the cursor to the given position (zero indexed)

func MoveCursorToColumn

func MoveCursorToColumn(column int)

MoveCursorToColumn moves the cursor to the given column (zero indexed)

func MoveCursorUp

func MoveCursorUp(rows int)

MoveCursorUp moves the cursor up by the given number of rows

func PrintErrorf

func PrintErrorf(message string, args ...interface{})

PrintErrorf prints a string to stdout in bold, red text

func PrintImportantf

func PrintImportantf(message string, args ...interface{})

PrintImportantf prints a string to stdout in bold, light blue text

func PrintSuccessf

func PrintSuccessf(message string, args ...interface{})

PrintSuccessf prints a string to stdout in bold, green text

func Reset

func Reset()

Reset terminal to it's initial state, destroying scroll buffer

func RestoreCursor

func RestoreCursor()

RestoreCursor restores the position of the cursor to the last position saved with SaveCursor

func SaveCursor

func SaveCursor()

SaveCursor saves the position of the cursor

func SetAltBuffer

func SetAltBuffer()

SetAltBuffer switches to the alternate screen buffer

func SetMainBuffer

func SetMainBuffer()

SetMainBuffer switches to the main screen buffer

func ShowCursor

func ShowCursor()

ShowCursor makes the cursor position highlighted

func ShowSensitiveData

func ShowSensitiveData(data string)

ShowSensitiveData will output a sensitive string in the alt buffer, and reset the terminal once the user presses enter, wiping all trace of the secret from the terminal display buffer

func Size

func Size() (int, int)

Size returns the width and height of the terminal, in columns and rows

Types

This section is empty.

Jump to

Keyboard shortcuts

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