Skip to content

Commit

Permalink
lint
Browse files Browse the repository at this point in the history
  • Loading branch information
mmetc committed Oct 21, 2022
1 parent 04f024a commit 6f2b029
Show file tree
Hide file tree
Showing 3 changed files with 4 additions and 3 deletions.
2 changes: 1 addition & 1 deletion pkg/acquisition/modules/wineventlog/wineventlog_windows.go
Original file line number Diff line number Diff line change
Expand Up @@ -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()
Expand Down
2 changes: 1 addition & 1 deletion pkg/setup/detect.go
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down
3 changes: 2 additions & 1 deletion pkg/setup/detect_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down Expand Up @@ -205,7 +206,7 @@ func TestListSupported(t *testing.T) {
"",
},
{
"invalid yaml: blah blah",
"invalid yaml: blahblah",
"blahblah",
nil,
"yaml: unmarshal errors:",
Expand Down

0 comments on commit 6f2b029

Please sign in to comment.