func (w *Writer) GetTermDimensions() (int, int) {
	cmd := exec.Command("stty", "size")
	cmd.Stdin = os.Stdin
	out, err := cmd.Output()
	if err != nil {
		return 80, 25
	}
	splits := strings.Split(strings.Trim(string(out), "\n"), " ")
	height, err := strconv.ParseInt(splits[0], 0, 0)
	width, err1 := strconv.ParseInt(splits[1], 0, 0)
	if err != nil || err1 != nil {
		return 80, 25
	}
	return int(width), int(height)
}
GetTermDimensions returns the width and height of the current terminal
package goterminal
import (
	"fmt"
	"os"
	"os/exec"
	"strconv"
	"strings"
)
func (w *Writer) Clear() {
	for i := 0; i < w.lineCount; i++ {
		fmt.Fprintf(w.Out, "%c[%dA", esc, 0)  
		fmt.Fprintf(w.Out, "%c[2K\r", esc)    
	}
	w.lineCount = 0
}