mirror of
https://codeberg.org/scip/esctl.git
synced 2026-08-24 11:34:17 +02:00
satisfy linter
This commit is contained in:
@@ -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]
|
||||||
|
|||||||
@@ -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))
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user