fix index response, fix linter issues

This commit is contained in:
2026-06-25 14:19:43 +02:00
parent d60983411e
commit 8f2c68b5b6
2 changed files with 5 additions and 6 deletions

View File

@@ -101,11 +101,10 @@ func IlmForecastList(conf *cfg.Config) error {
table.AddRow( table.AddRow(
phase.index, phase.index,
humanize.Bytes(uint64(phase.size)), humanize.Bytes(uint64(phase.size)),
fmt.Sprintf("%s", phase.age), phase.age.String(),
virtualAge.String(),
fmt.Sprintf("%s", virtualAge), phase.minage.String(),
fmt.Sprintf("%s", phase.minage),
humanize.Bytes(uint64(phase.minsize)), humanize.Bytes(uint64(phase.minsize)),
phase.currentPhase, phase.currentPhase,
@@ -189,7 +188,7 @@ func getIlmPhaseData(conf *cfg.Config) ([]PhaseData, error) {
case ResponseExplain: case ResponseExplain:
ilmdetails = r.explainlifecycle ilmdetails = r.explainlifecycle
case ResponseIndices: case ResponseIndices:
indicesres = r.indices indicesres = r.indicesbytes
case ResponseLifecycle: case ResponseLifecycle:
ilmpolicies = *r.lifecycle ilmpolicies = *r.lifecycle
} }

View File

@@ -113,7 +113,7 @@ func getApiData(es *elasticsearch.TypedClient, wg *sync.WaitGroup,
Bytes(bytes.Bytes{Name: "b"}). Bytes(bytes.Bytes{Name: "b"}).
Do(context.Background()) Do(context.Background())
ar.indices = &res ar.indicesbytes = &res
ar.which = ResponseIndices ar.which = ResponseIndices
arerr = err arerr = err