2021-03-24 15:09:28 -04:00
|
|
|
package ansi
|
|
|
|
|
|
|
|
import "fmt"
|
|
|
|
|
2021-03-24 15:20:57 -04:00
|
|
|
const ClearLine = "\x1b[K"
|
2021-03-24 15:09:28 -04:00
|
|
|
const ClearScreen = "\x1b[2J"
|
2021-03-24 15:20:57 -04:00
|
|
|
|
|
|
|
const HideCursor = "\x1b[?25l"
|
|
|
|
const ShowCursor = "\x1b[?25h"
|
2021-03-24 15:09:28 -04:00
|
|
|
const ResetCursor = "\x1b[H"
|
|
|
|
|
|
|
|
func Code (s string) string {
|
|
|
|
return fmt.Sprintf("\x1b[%s", s)
|
|
|
|
}
|