fix: format headers (#1383)

Signed-off-by: DRAGON <anantvijay3@gmail.com>
This commit is contained in:
DRAGON2002
2023-09-13 15:57:56 +05:30
committed by GitHub
parent a6cca30eb0
commit a3f80d91bf
10 changed files with 37 additions and 25 deletions

View File

@@ -96,6 +96,8 @@ func prettyPrintListFormat(ctx context.Context, targetPolicy string, policies []
policyTable.SetHeader([]string{header})
policyTable.SetHeaderLine(true)
policyTable.SetRowLine(true)
policyTable.SetHeaderAlignment(tablewriter.ALIGN_LEFT)
policyTable.SetAutoFormatHeaders(false)
policyTable.SetAlignment(tablewriter.ALIGN_CENTER)
policyTable.SetUnicodeHVC(tablewriter.Regular, tablewriter.Regular, gchalk.Ansi256(238))
data := v2.Matrix{}
@@ -126,6 +128,8 @@ func prettyPrintControls(ctx context.Context, policies []string) {
controlsTable.SetAutoWrapText(false)
controlsTable.SetHeaderLine(true)
controlsTable.SetRowLine(true)
controlsTable.SetHeaderAlignment(tablewriter.ALIGN_LEFT)
controlsTable.SetAutoFormatHeaders(false)
controlsTable.SetUnicodeHVC(tablewriter.Regular, tablewriter.Regular, gchalk.Ansi256(238))
controlRows := generateControlRows(policies)