kevinschoon-pomo/vendor/github.com/gosuri/uilive/writer_posix.go

15 lines
246 B
Go

// +build !windows
package uilive
import (
"fmt"
)
func (w *Writer) clearLines() {
for i := 0; i < w.lineCount; i++ {
fmt.Fprintf(w.Out, "%c[2K", ESC) // clear the line
fmt.Fprintf(w.Out, "%c[%dA", ESC, 1) // move the cursor up
}
}