Explorar o código

ctlv3: right-align the table output

Gyu-Ho Lee %!s(int64=9) %!d(string=hai) anos
pai
achega
ce9f73a34c
Modificáronse 1 ficheiros con 3 adicións e 0 borrados
  1. 3 0
      etcdctl/ctlv3/command/printer_table.go

+ 3 - 0
etcdctl/ctlv3/command/printer_table.go

@@ -31,6 +31,7 @@ func (tp *tablePrinter) MemberList(r v3.MemberListResponse) {
 	for _, row := range rows {
 		table.Append(row)
 	}
+	table.SetAlignment(tablewriter.ALIGN_RIGHT)
 	table.Render()
 }
 func (tp *tablePrinter) EndpointStatus(r []epStatus) {
@@ -40,6 +41,7 @@ func (tp *tablePrinter) EndpointStatus(r []epStatus) {
 	for _, row := range rows {
 		table.Append(row)
 	}
+	table.SetAlignment(tablewriter.ALIGN_RIGHT)
 	table.Render()
 }
 func (tp *tablePrinter) DBStatus(r dbstatus) {
@@ -49,5 +51,6 @@ func (tp *tablePrinter) DBStatus(r dbstatus) {
 	for _, row := range rows {
 		table.Append(row)
 	}
+	table.SetAlignment(tablewriter.ALIGN_RIGHT)
 	table.Render()
 }