This commit is contained in:
Erik Winter 2024-12-29 09:33:40 +01:00
parent bd1c0136a9
commit 45d0bdfc34
1 changed files with 8 additions and 7 deletions

View File

@ -1,6 +1,7 @@
package format package format
import ( import (
"fmt"
"os" "os"
"os/exec" "os/exec"
"strconv" "strconv"
@ -57,19 +58,19 @@ func Table(data [][]string) string {
// print the rows // print the rows
var output string var output string
for _, row := range data { for r, row := range data {
// if r%3 == 0 { if r%3 == 0 {
// output += fmt.Sprintf("%s", "\x1b[48;5;237m") output += fmt.Sprintf("%s", "\x1b[48;5;237m")
// } }
for c, col := range row { for c, col := range row {
output += col output += col
if c != len(row)-1 { if c != len(row)-1 {
output += " " output += " "
} }
} }
// if r%3 == 0 { if r%3 == 0 {
// output += fmt.Sprintf("%s", "\x1b[49m") output += fmt.Sprintf("%s", "\x1b[49m")
// } }
output += "\n" output += "\n"
} }