https://stackoverflow.com/questions/9535954/printing-lists-as-tabular-data
prettytable可以使用属性:
table.SetRowLine(border)
table.SetRowSeparator("-")
https://pkg.go.dev/github.com/olekukonko/tablewriter@v0.0.0-20170122224234-a0225b3f23b5#section-readme
Example 4 - Custom Separator
table, _ := tablewriter.NewCSV(os.Stdout, "test.csv", true)
table.SetRowLine(true) // Enable row line
// Change table lines
table.SetCenterSeparator("*")
table.SetColumnSeparator("‡")
table.SetRowSeparator("-")
table.SetAlignment(tablewriter.ALIGN_LEFT)
table.Render()
网友评论