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] {