Skip to content

Commit

Permalink
lint
Browse files Browse the repository at this point in the history
  • Loading branch information
mmetc committed Oct 28, 2024
1 parent 573a90e commit 6b3c81b
Show file tree
Hide file tree
Showing 3 changed files with 4 additions and 4 deletions.
2 changes: 2 additions & 0 deletions pkg/acquisition/acquisition_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -61,6 +61,7 @@ func (f *MockSource) GetMode() string { return f.Mode }
func (f *MockSource) OneShotAcquisition(context.Context, chan types.Event, *tomb.Tomb) error {
return nil
}

func (f *MockSource) StreamingAcquisition(context.Context, chan types.Event, *tomb.Tomb) error {
return nil
}
Expand Down Expand Up @@ -513,6 +514,7 @@ func (f *MockSourceByDSN) GetMode() string { return f.Mode }
func (f *MockSourceByDSN) OneShotAcquisition(context.Context, chan types.Event, *tomb.Tomb) error {
return nil
}

func (f *MockSourceByDSN) StreamingAcquisition(context.Context, chan types.Event, *tomb.Tomb) error {
return nil
}
Expand Down
5 changes: 2 additions & 3 deletions pkg/acquisition/modules/wineventlog/wineventlog_windows.go
Original file line number Diff line number Diff line change
Expand Up @@ -83,7 +83,7 @@ func logLevelToInt(logLevel string) ([]string, error) {

// This is lifted from winops/winlog, but we only want to render the basic XML string, we don't need the extra fluff
func (w *WinEventLogSource) getXMLEvents(config *winlog.SubscribeConfig, publisherCache map[string]windows.Handle, resultSet windows.Handle, maxEvents int) ([]string, error) {
var events = make([]windows.Handle, maxEvents)
events := make([]windows.Handle, maxEvents)
var returned uint32

// Get handles to events from the result set.
Expand Down Expand Up @@ -362,7 +362,7 @@ func (w *WinEventLogSource) ConfigureByDSN(dsn string, labels map[string]string,

var err error

//FIXME: handle custom xpath query
// FIXME: handle custom xpath query
w.query, err = w.buildXpathQuery()

if err != nil {
Expand Down Expand Up @@ -390,7 +390,6 @@ func (w *WinEventLogSource) SupportedModes() []string {

func (w *WinEventLogSource) OneShotAcquisition(ctx context.Context, out chan types.Event, t *tomb.Tomb) error {
handle, err := wevtapi.EvtQuery(localMachine, w.evtConfig.ChannelPath, w.evtConfig.Query, w.evtConfig.Flags)

if err != nil {
return fmt.Errorf("EvtQuery failed: %v", err)
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -177,7 +177,6 @@ event_ids:
subLogger := log.WithField("type", "windowseventlog")

evthandler, err := eventlog.Open("Application")

if err != nil {
t.Fatalf("failed to open event log: %s", err)
}
Expand Down

0 comments on commit 6b3c81b

Please sign in to comment.