fix(table): invalid column number

This commit is contained in:
Maas Lalani 2022-10-11 14:40:25 -04:00
parent 1426c2fed9
commit b4c07eb3b9
No known key found for this signature in database
GPG key ID: 5A6ED5CBF1A0A000

View file

@ -77,6 +77,9 @@ func (o Options) Run() error {
var rows = make([]table.Row, 0, len(data))
for _, row := range data {
if len(row) > len(columns) {
return fmt.Errorf("invalid number of columns")
}
rows = append(rows, table.Row(row))
}