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

@@ -104,8 +104,8 @@ func IndexList(conf *cfg.Config) error {
}
}
table := printer.NewTable(conf).WithSize(3, size)
table.Addheaders("name", "size", "docscount")
table := printer.NewTable(conf).WithSize(3, size).
WithHeaders("name", "size", "docscount")
for idx, index := range list {
name := printer.Colorize(conf, *index.Health, *index.Index)
@@ -140,8 +140,8 @@ func IndexShow(conf *cfg.Config, indexpattern string) error {
idx++
}
table := printer.NewTable(conf).WithSize(2, 7)
table.Addheaders("index property", "value")
table := printer.NewTable(conf).WithSize(2, 7).
WithHeaders("index property", "value")
ts, err := strconv.ParseInt(index.Settings.Index.CreationDate.(string), 10, 64)
if err != nil {
@@ -263,8 +263,8 @@ func IndexFields(conf *cfg.Config, index string) error {
return fmt.Errorf("failed to retrieve field capabilties: %w", esErrorString(err))
}
table := printer.NewTable(conf).WithSize(5, 0)
table.Addheaders("field", "type", "searchable", "aggretable", "metadata")
table := printer.NewTable(conf).WithSize(5, 0).
WithHeaders("field", "type", "searchable", "aggretable", "metadata")
idx := 0