You can not select more than 25 topics
Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
21 lines
234 B
21 lines
234 B
4 years ago
|
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)
|
||
|
}
|