Skip to content

Commit be5af75

Browse files
committed
feat(alb): Include number of errors
1 parent baf91fb commit be5af75

File tree

1 file changed

+6
-1
lines changed

1 file changed

+6
-1
lines changed

internal/cmd/beta/alb/list/list.go

Lines changed: 6 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -154,13 +154,18 @@ func outputResult(p *print.Printer, outputFormat string, items []alb.LoadBalance
154154
return nil
155155
default:
156156
table := tables.NewTable()
157-
table.SetHeader("NAME", "EXTERNAL ADDRESS", "REGION", "STATUS", "VERSION")
157+
table.SetHeader("NAME", "EXTERNAL ADDRESS", "REGION", "STATUS", "VERSION", "ERRORS")
158158
for _, item := range items {
159+
var errNo int
160+
if item.Errors != nil {
161+
errNo = len(*item.Errors)
162+
}
159163
table.AddRow(utils.PtrString(item.Name),
160164
utils.PtrString(item.ExternalAddress),
161165
utils.PtrString(item.Region),
162166
utils.PtrString(item.Status),
163167
utils.PtrString(item.Version),
168+
errNo,
164169
)
165170
}
166171
err := table.Display(p)

0 commit comments

Comments
 (0)