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

@@ -78,7 +78,7 @@ func IndexAliasList(conf *cfg.Config) error {
idx := 0
for index, aliases := range aliaslist {
table.Entries[idx] = []string{
table.Entries[idx] = []any{
index,
strings.Join(aliases, ","),
}
@@ -117,10 +117,10 @@ func IndexAliasRollover(conf *cfg.Config, alias string) error {
table := printer.NewTable(conf, 2, 5)
table.Addheaders("rollover response", "value")
table.Entries = [][]string{
{"acknowledged", fmt.Sprintf("%t", res.Acknowledged)},
{"rolled over", fmt.Sprintf("%t", res.RolledOver)},
{"shards acknowledged", fmt.Sprintf("%t", res.ShardsAcknowledged)},
table.Entries = [][]any{
{"acknowledged", res.Acknowledged},
{"rolled over", res.RolledOver},
{"shards acknowledged", res.ShardsAcknowledged},
{"old index", res.OldIndex},
{"new index", res.NewIndex},
}