From 9e13987e169250f819e794641488679e1fc1000f Mon Sep 17 00:00:00 2001 From: Lewis Steele Date: Fri, 13 Dec 2024 19:10:54 +0000 Subject: [PATCH] Rename package to table --- cmd/connect.go | 3 ++- internal/{output => table}/table.go | 4 ++-- 2 files changed, 4 insertions(+), 3 deletions(-) rename internal/{output => table}/table.go (86%) diff --git a/cmd/connect.go b/cmd/connect.go index 6495945..52e0907 100644 --- a/cmd/connect.go +++ b/cmd/connect.go @@ -10,6 +10,7 @@ import ( "github.com/lewissteele/dbat/internal/db" "github.com/lewissteele/dbat/internal/input" "github.com/lewissteele/dbat/internal/output" + "github.com/lewissteele/dbat/internal/table" "github.com/spf13/cobra" ) @@ -60,7 +61,7 @@ func executor(q string) { return } - output.RenderTable(results) + table.Render(results) db.SaveHistory(q) } diff --git a/internal/output/table.go b/internal/table/table.go similarity index 86% rename from internal/output/table.go rename to internal/table/table.go index 0fd382e..b07d346 100644 --- a/internal/output/table.go +++ b/internal/table/table.go @@ -1,11 +1,11 @@ -package output +package table import ( "fmt" "github.com/jedib0t/go-pretty/v6/table" ) -func RenderTable(d []map[string]interface{}) { +func Render(d []map[string]interface{}) { var headers table.Row for k, _ := range d[0] {