From b462335db45d664b6f4304b42ee3a2b660e2b5f2 Mon Sep 17 00:00:00 2001 From: Baipyrus Date: Mon, 15 Apr 2024 01:32:56 +0200 Subject: [PATCH] bugfix: cursor positioning and printing --- main.go | 6 ++---- 1 file changed, 2 insertions(+), 4 deletions(-) diff --git a/main.go b/main.go index bc5f315..46ec0a0 100644 --- a/main.go +++ b/main.go @@ -10,7 +10,7 @@ import ( ) func output(client *resty.Client, url string, width, height int, arr [][]Cell) { - goterm.MoveCursor(0, 0) + goterm.MoveCursor(1, 2) // Prepare instructions for matrix instructions := make([]interface{}, 0) // Append all live cells as pixel instructions @@ -43,10 +43,8 @@ func main() { // Load env server data url, width, height := loadMatrixData() - log.Printf("At '%s': %d x %d\n", url, width, height) + goterm.Printf("At '%s': %d x %d\n", url, width, height) - // Initialize terminal UI - goterm.Clear() // Initialize resty client client := resty.New() // Initialize pixel color