From 45d0bdfc34e4b77b7e94f2615fe1495555b32ea0 Mon Sep 17 00:00:00 2001 From: Erik Winter Date: Sun, 29 Dec 2024 09:33:40 +0100 Subject: [PATCH] show --- plan/format/format.go | 15 ++++++++------- 1 file changed, 8 insertions(+), 7 deletions(-) diff --git a/plan/format/format.go b/plan/format/format.go index fa24d37..5b5e955 100644 --- a/plan/format/format.go +++ b/plan/format/format.go @@ -1,6 +1,7 @@ package format import ( + "fmt" "os" "os/exec" "strconv" @@ -57,19 +58,19 @@ func Table(data [][]string) string { // print the rows var output string - for _, row := range data { - // if r%3 == 0 { - // output += fmt.Sprintf("%s", "\x1b[48;5;237m") - // } + for r, row := range data { + if r%3 == 0 { + output += fmt.Sprintf("%s", "\x1b[48;5;237m") + } for c, col := range row { output += col if c != len(row)-1 { output += " " } } - // if r%3 == 0 { - // output += fmt.Sprintf("%s", "\x1b[49m") - // } + if r%3 == 0 { + output += fmt.Sprintf("%s", "\x1b[49m") + } output += "\n" }