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 (
|
||||
// Clears the line after the escape sequence
|
||||
ClearLine = "\x1b[K"
|
||||
ClearLine = EscPrefix + "K"
|
||||
|
||||
// Clears the entire screen
|
||||
ClearScreen = "\x1b[2J"
|
||||
ClearScreen = EscPrefix + "2J"
|
||||
)
|
||||
|
||||
// Cursor Codes
|
||||
const (
|
||||
HideCursor = "\x1b[?25l"
|
||||
ShowCursor = "\x1b[?25h"
|
||||
HideCursor = EscPrefix + "?25l"
|
||||
ShowCursor = EscPrefix + "?25h"
|
||||
|
||||
// Reports cursor location to stdout
|
||||
LocateCursor = "\x1b[6n"
|
||||
LocateCursor = EscPrefix + "6n"
|
||||
|
||||
// Moves cursor to default position (1,1)
|
||||
ResetCursor = "\x1b[H"
|
||||
ResetCursor = EscPrefix + "H"
|
||||
)
|
||||
|
||||
// ----------------------------------------------------------------------------
|
||||
|
Loading…
Reference in New Issue
Block a user