From 98d34a88a0add89902a526acaf01835cd191e0e9 Mon Sep 17 00:00:00 2001 From: Dan Kortschak Date: Mon, 30 Sep 2024 17:53:43 +0930 Subject: [PATCH] libbeat/cfgfile: remove futile errors.Is call (#40851) Also remove the no-lint directive and use errors.As to identify the type of the error returned by createRunner. --- libbeat/cfgfile/list.go | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/libbeat/cfgfile/list.go b/libbeat/cfgfile/list.go index d557ffa25c24..3a9e3429d297 100644 --- a/libbeat/cfgfile/list.go +++ b/libbeat/cfgfile/list.go @@ -131,8 +131,7 @@ func (r *RunnerList) Reload(configs []*reload.ConfigWithMeta) error { for hash, config := range startList { runner, err := createRunner(r.factory, r.pipeline, config) if err != nil { - errors.Is(err, &common.ErrInputNotFinished{}) - if _, ok := err.(*common.ErrInputNotFinished); ok { //nolint:errorlint // ErrInputNotFinished is a struct type, not an expression/error value + if errors.As(err, new(*common.ErrInputNotFinished)) { // error is related to state, we should not log at error level r.logger.Debugf("Error creating runner from config: %s", err) } else {