mirror of
https://codeberg.org/scip/esctl.git
synced 2026-08-24 13:44:17 +02:00
streamline table api
This commit is contained in:
@@ -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{
|
||||
|
||||
Reference in New Issue
Block a user