Skip to content

Commit

Permalink
address lint warnings
Browse files Browse the repository at this point in the history
  • Loading branch information
belimawr committed Dec 19, 2024
1 parent 5ddb9eb commit 4c1db16
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 1 deletion.
1 change: 1 addition & 0 deletions libbeat/common/errors.go
Original file line number Diff line number Diff line change
Expand Up @@ -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{})
Expand Down
4 changes: 3 additions & 1 deletion x-pack/libbeat/management/managerV2.go
Original file line number Diff line number Diff line change
Expand Up @@ -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() {
Expand Down Expand Up @@ -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)
Expand Down

0 comments on commit 4c1db16

Please sign in to comment.