Use new table formatter everywhere (#3544)

This commit is contained in:
Dean Sheather
2022-08-19 02:41:00 +10:00
committed by GitHub
parent c43297937b
commit 3610402cd8
13 changed files with 199 additions and 198 deletions
+3 -3
View File
@@ -111,13 +111,13 @@ func userSingle() *cobra.Command {
}
func displayUser(ctx context.Context, stderr io.Writer, client *codersdk.Client, user codersdk.User) string {
tableWriter := cliui.Table()
tw := cliui.Table()
addRow := func(name string, value interface{}) {
key := ""
if name != "" {
key = name + ":"
}
tableWriter.AppendRow(table.Row{
tw.AppendRow(table.Row{
key, value,
})
}
@@ -170,5 +170,5 @@ func displayUser(ctx context.Context, stderr io.Writer, client *codersdk.Client,
addRow("Organizations", "(none)")
}
return tableWriter.Render()
return tw.Render()
}