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

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