diff --git a/pkg/printer/table.go b/pkg/printer/table.go index fd40b36..cf412d4 100644 --- a/pkg/printer/table.go +++ b/pkg/printer/table.go @@ -206,6 +206,22 @@ func (table *Table) AddRow(fields ...any) { table.Entries = append(table.Entries, fields) } +func (table *Table) AddRowLate(fields ...any) { + table.AddRow(fields) + + if !table.processed { + return + } + + row := make([]string, len(fields)) + + for idx, field := range fields { + row[idx] = any2string(field) + } + + table.rows = append(table.rows, row) +} + // needed for json and yaml output func (table *Table) toMap() []map[string]any { raw := make([]map[string]any, len(table.Entries))