mirror of
https://github.com/cupcakearmy/autorestic.git
synced 2025-09-01 16:20:40 +00:00
go rewrite
This commit is contained in:
20
internal/terminal/main.go
Normal file
20
internal/terminal/main.go
Normal file
@@ -0,0 +1,20 @@
|
||||
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)
|
||||
}
|
Reference in New Issue
Block a user