further table streamlining: work with new table api everywhere

This commit is contained in:
2026-08-09 21:48:03 +02:00
parent b49153bd38
commit 2841a94fe5
27 changed files with 271 additions and 249 deletions

View File

@@ -72,8 +72,8 @@ func IndexAliasList(conf *cfg.Config) error {
}
}
table := printer.NewTable(conf).WithSize(2, len(aliaslist))
table.Addheaders("index", "alias")
table := printer.NewTable(conf).WithSize(2, len(aliaslist)).
WithHeaders("index", "alias")
idx := 0
for index, aliases := range aliaslist {
@@ -113,8 +113,8 @@ func IndexAliasRollover(conf *cfg.Config, alias string) error {
return fmt.Errorf("failed to rollover index alias: %w", esErrorString(err))
}
table := printer.NewTable(conf).WithSize(2, 5)
table.Addheaders("rollover response", "value")
table := printer.NewTable(conf).WithSize(2, 5).
WithHeaders("rollover response", "value")
table.Entries = [][]any{
{"acknowledged", res.Acknowledged},
{"rolled over", res.RolledOver},