Cut down on repetition with ansi constants
All checks were successful
timw4mail/gilo/pipeline/head This commit looks good
All checks were successful
timw4mail/gilo/pipeline/head This commit looks good
This commit is contained in:
parent
87e742af5c
commit
d2a6c480a7
@ -12,22 +12,22 @@ const EscPrefix = "\x1b["
|
|||||||
|
|
||||||
const (
|
const (
|
||||||
// Clears the line after the escape sequence
|
// Clears the line after the escape sequence
|
||||||
ClearLine = "\x1b[K"
|
ClearLine = EscPrefix + "K"
|
||||||
|
|
||||||
// Clears the entire screen
|
// Clears the entire screen
|
||||||
ClearScreen = "\x1b[2J"
|
ClearScreen = EscPrefix + "2J"
|
||||||
)
|
)
|
||||||
|
|
||||||
// Cursor Codes
|
// Cursor Codes
|
||||||
const (
|
const (
|
||||||
HideCursor = "\x1b[?25l"
|
HideCursor = EscPrefix + "?25l"
|
||||||
ShowCursor = "\x1b[?25h"
|
ShowCursor = EscPrefix + "?25h"
|
||||||
|
|
||||||
// Reports cursor location to stdout
|
// Reports cursor location to stdout
|
||||||
LocateCursor = "\x1b[6n"
|
LocateCursor = EscPrefix + "6n"
|
||||||
|
|
||||||
// Moves cursor to default position (1,1)
|
// Moves cursor to default position (1,1)
|
||||||
ResetCursor = "\x1b[H"
|
ResetCursor = EscPrefix + "H"
|
||||||
)
|
)
|
||||||
|
|
||||||
// ----------------------------------------------------------------------------
|
// ----------------------------------------------------------------------------
|
||||||
|
Loading…
Reference in New Issue
Block a user