perfomance boost

This commit is contained in:
2024-10-03 20:02:56 +02:00
parent f2f7e51750
commit 0f052d7652
5 changed files with 80 additions and 28 deletions
+18
View File
@@ -84,6 +84,24 @@ func ReadKey() (string, error) {
return string(b[:n]), nil
}
func DisableEcho() {
switch runtime.GOOS {
case "windows":
// Need to implement this later
default:
exec.Command("stty", "-F", "/dev/tty", "-echo").Run()
}
}
func EnableEcho() {
switch runtime.GOOS {
case "windows":
// Need to implement this later
default:
exec.Command("stty", "-F", "/dev/tty", "echo").Run()
}
}
func NewFrame(width, height int) []string {
frame := make([]string, height)
for i := 0; i < height; i++ {