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

@@ -100,8 +100,8 @@ func printShards(conf *cfg.Config, shardlist shards.Response) error {
headers = append(headers, "node", "ip")
}
table := printer.NewTable(conf).WithSize(len(headers), len(shardlist))
table.Addheaders(headers...)
table := printer.NewTable(conf).WithSize(len(headers), len(shardlist)).
WithHeaders(headers...)
for idx, shard := range shardlist {
name := colorzizeShard(conf, *shard.State, *shard.Index)
@@ -163,8 +163,8 @@ func ShardAllocation(conf *cfg.Config, index string) error {
slog.Debug("ES result", "explain", res)
table := printer.NewTable(conf).WithSize(2, 10)
table.Addheaders("shard allocation setting", "value")
table := printer.NewTable(conf).WithSize(2, 10).
WithHeaders("shard allocation setting", "value")
table.Entries = [][]any{
{"Index", index},