streamline table api

This commit is contained in:
2026-08-07 22:59:33 +02:00
parent 59331fc721
commit ce5d7f51c6
25 changed files with 73 additions and 74 deletions

View File

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