1package zli
2
3import "fmt"
4
5// ErasesLine erases the entire line and puts the cursor at the start of the
6// line.
7func EraseLine() { Stdout.Write([]byte("\x1b[2K\r")) }
8
9// ReplaceLine replaces the current line.
10func ReplaceLine(a ...interface{}) {
11	EraseLine()
12	fmt.Fprint(Stdout, a...)
13}
14
15// ReplaceLinef replaces the current line.
16func ReplaceLinef(s string, a ...interface{}) {
17	EraseLine()
18	fmt.Fprintf(Stdout, s, a...)
19}
20