From 173e40103bc60b9b7485f089daeeddf8c3a0770a Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Filip=20Tron=C3=AD=C4=8Dek?= Date: Sun, 29 Oct 2023 19:40:40 +0000 Subject: [PATCH] Simplify table code --- components/local-app/cmd/organization-list.go | 4 +--- components/local-app/cmd/workspaces-list.go | 5 +---- 2 files changed, 2 insertions(+), 7 deletions(-) diff --git a/components/local-app/cmd/organization-list.go b/components/local-app/cmd/organization-list.go index 4affaca80e2407..f7c47d7e04d73a 100644 --- a/components/local-app/cmd/organization-list.go +++ b/components/local-app/cmd/organization-list.go @@ -37,10 +37,8 @@ var listOrganizationCommand = &cobra.Command{ table := tablewriter.NewWriter(os.Stdout) table.SetHeader([]string{"Name", "Id"}) table.SetBorders(tablewriter.Border{Left: true, Top: false, Right: true, Bottom: false}) - table.SetCenterSeparator("") - table.SetRowSeparator("") + table.SetBorder(false) table.SetColumnSeparator("") - table.SetAutoWrapText(true) table.SetHeaderAlignment(tablewriter.ALIGN_LEFT) table.SetHeaderLine(false) diff --git a/components/local-app/cmd/workspaces-list.go b/components/local-app/cmd/workspaces-list.go index dc7de5164ce83c..feb59a6806ed18 100644 --- a/components/local-app/cmd/workspaces-list.go +++ b/components/local-app/cmd/workspaces-list.go @@ -44,11 +44,8 @@ var listWorkspaceCommand = &cobra.Command{ table := tablewriter.NewWriter(os.Stdout) table.SetHeader([]string{"Repo", "Branch", "Workspace ID", "Status"}) - table.SetBorders(tablewriter.Border{Left: true, Top: false, Right: true, Bottom: false}) - table.SetCenterSeparator("") - table.SetRowSeparator("") + table.SetBorder(false) table.SetColumnSeparator("") - table.SetAutoWrapText(true) table.SetHeaderAlignment(tablewriter.ALIGN_LEFT) table.SetHeaderLine(false)