mirror of
https://github.com/cupcakearmy/autorestic.git
synced 2024-12-23 16:56:25 +00:00
21 lines
234 B
Go
21 lines
234 B
Go
|
package terminal
|
||
|
|
||
|
import (
|
||
|
tm "github.com/buger/goterm"
|
||
|
)
|
||
|
|
||
|
func Clear() {
|
||
|
tm.Clear()
|
||
|
}
|
||
|
|
||
|
func Append(line string) {
|
||
|
tm.Println(line)
|
||
|
tm.Flush()
|
||
|
}
|
||
|
|
||
|
func Replace(line string) {
|
||
|
tm.MoveCursorUp(1)
|
||
|
tm.Print("\033[K")
|
||
|
Append(line)
|
||
|
}
|