satisfy linter

This commit is contained in:
2026-07-07 10:24:59 +02:00
parent 2f77c27715
commit 02fe22b18f
2 changed files with 4 additions and 2 deletions

View File

@@ -152,11 +152,11 @@ func CcrFollowerShow(conf *cfg.Config, index string) error {
slog.Debug("ES result", "follower stats", res.Indices) slog.Debug("ES result", "follower stats", res.Indices)
if len(res.Indices) == 0 { if len(res.Indices) == 0 {
return fmt.Errorf("cluster did not return any follower stats for index %w", index) return fmt.Errorf("cluster did not return any follower stats for index %s", index)
} }
if len(res.Indices[0].Shards) == 0 { if len(res.Indices[0].Shards) == 0 {
return fmt.Errorf("cluster did not return any shard stats on follower index %w", index) return fmt.Errorf("cluster did not return any shard stats on follower index %s", index)
} }
follower := res.Indices[0].Shards[0] follower := res.Indices[0].Shards[0]

View File

@@ -32,6 +32,8 @@ func esErrorString(err error) error {
var causes strings.Builder var causes strings.Builder
for _, cause := range e.ErrorCause.RootCause { for _, cause := range e.ErrorCause.RootCause {
// FIXME: re-activate linter here, see https://github.com/golangci/golangci-lint/issues/6662
//nolint:all
causes.WriteString(fmt.Sprintf("%s\n", *cause.Reason)) causes.WriteString(fmt.Sprintf("%s\n", *cause.Reason))
} }