From 4c1db16277fabf34cc875b614eca800637cd7f85 Mon Sep 17 00:00:00 2001 From: Tiago Queiroz Date: Thu, 19 Dec 2024 12:28:34 -0500 Subject: [PATCH] address lint warnings --- libbeat/common/errors.go | 1 + x-pack/libbeat/management/managerV2.go | 4 +++- 2 files changed, 4 insertions(+), 1 deletion(-) diff --git a/libbeat/common/errors.go b/libbeat/common/errors.go index 3a73891ae3ec..9eddc425ae53 100644 --- a/libbeat/common/errors.go +++ b/libbeat/common/errors.go @@ -66,6 +66,7 @@ func IsInputReloadable(err error) bool { Unwrap() []error } + //nolint:errorlint // we only want to check that specific error, not all errors in the chain errList, isErrList := err.(unwrapList) if !isErrList { return !errors.Is(err, ErrNonReloadable{}) diff --git a/x-pack/libbeat/management/managerV2.go b/x-pack/libbeat/management/managerV2.go index d002166ab6dc..dd6194f119c2 100644 --- a/x-pack/libbeat/management/managerV2.go +++ b/x-pack/libbeat/management/managerV2.go @@ -688,6 +688,8 @@ func (cm *BeatV2Manager) reload(units map[unitKey]*agentUnit) { type unwrapList interface { Unwrap() []error } + + //nolint:errorlint // That's a custom logic based on how reloadInputs builds the error errList, isErrList := err.(unwrapList) if isErrList { for _, err := range errList.Unwrap() { @@ -841,7 +843,7 @@ func (cm *BeatV2Manager) reloadInputs(inputUnits []*agentUnit) error { type unwrapList interface { Unwrap() []error } - errList, isErrList := err.(unwrapList) + errList, isErrList := err.(unwrapList) //nolint:errorlint // see the comment above if isErrList { for _, err := range errList.Unwrap() { causeErr := errors.Unwrap(err)