diff --git a/pkg/acquisition/modules/wineventlog/wineventlog_windows.go b/pkg/acquisition/modules/wineventlog/wineventlog_windows.go index 77876555a37f..2d93178199d0 100644 --- a/pkg/acquisition/modules/wineventlog/wineventlog_windows.go +++ b/pkg/acquisition/modules/wineventlog/wineventlog_windows.go @@ -246,7 +246,7 @@ func (w *WinEventLogSource) UnmarshalConfig(yamlConfig []byte) error { w.config.Mode = configuration.TAIL_MODE - if config.XPathQuery != "" { + if w.config.XPathQuery != "" { w.query = w.config.XPathQuery } else { w.query, err = w.buildXpathQuery() diff --git a/pkg/setup/detect.go b/pkg/setup/detect.go index 94208ac7234b..957f70a258da 100644 --- a/pkg/setup/detect.go +++ b/pkg/setup/detect.go @@ -229,7 +229,7 @@ func (os ExprOS) VersionIsLower(version string) (bool, error) { return !result, nil } -// ExprEnvironment is used to expose functions and values to to the rule engine. +// ExprEnvironment is used to expose functions and values to the rule engine. // It can cache the results of service detection commands, like systemctl etc. type ExprEnvironment struct { OS ExprOS diff --git a/pkg/setup/detect_test.go b/pkg/setup/detect_test.go index 90d71488df15..9dd3a7ce87dc 100644 --- a/pkg/setup/detect_test.go +++ b/pkg/setup/detect_test.go @@ -14,6 +14,7 @@ import ( "github.com/crowdsecurity/crowdsec/pkg/setup" ) +//nolint:dupword var fakeSystemctlOutput = `UNIT FILE STATE VENDOR PRESET crowdsec-setup-detect.service enabled enabled apache2.service enabled enabled @@ -205,7 +206,7 @@ func TestListSupported(t *testing.T) { "", }, { - "invalid yaml: blah blah", + "invalid yaml: blahblah", "blahblah", nil, "yaml: unmarshal errors:",