conversion from string cells to any cells in printer.Table

This commit is contained in:
2026-07-07 06:30:07 +02:00
parent 033dd0ccd1
commit 2d8ecae73b
19 changed files with 135 additions and 157 deletions

View File

@@ -72,7 +72,7 @@ func checkClusterStatus(conf *cfg.Config, leader, follower string) bool {
table.Addheaders("setting", "leader:"+leader, "follower:"+follower)
table.Entries = [][]string{
table.Entries = [][]any{
{"Cluster Name", status[leader].ClusterName, status[follower].ClusterName},
{"Cluster Status",
printer.Colorize(conf, status[leader].Status.Name, status[leader].Status.Name),
@@ -150,7 +150,7 @@ func findIlmErrors(conf *cfg.Config, leader, follower string) bool {
table.Addheaders("ilm errors on "+which, "errors")
for name, count := range failed[cluster] {
table.Entries[idx] = []string{name, count}
table.Entries[idx] = []any{name, count}
idx++
}
@@ -222,7 +222,7 @@ func findIndicesOnlyOnLeader(conf *cfg.Config, indices ClusterIndices, leader, f
for name, index := range indexOnlyOnLeader {
name := printer.Colorize(conf, "red", name)
table.Entries[idx] = []string{name, *index.DatasetSize, *index.DocsCount}
table.Entries[idx] = []any{name, *index.DatasetSize, *index.DocsCount}
idx++
}
@@ -270,7 +270,7 @@ func findOrphanedIndices(conf *cfg.Config, indices ClusterIndices, leader, follo
for name, index := range orphaned {
name := printer.Colorize(conf, "red", name)
table.Entries[idx] = []string{name, *index.DatasetSize, *index.DocsCount}
table.Entries[idx] = []any{name, *index.DatasetSize, *index.DocsCount}
idx++
}
@@ -304,7 +304,7 @@ func findFailedFollowerIndices(conf *cfg.Config, indices ClusterIndices, followe
for name, index := range red {
name := printer.Colorize(conf, "red", name)
table.Entries[idx] = []string{name, *index.DatasetSize, *index.DocsCount}
table.Entries[idx] = []any{name, *index.DatasetSize, *index.DocsCount}
idx++
}