diff --git a/pkg/acquisition/acquisition_test.go b/pkg/acquisition/acquisition_test.go index db142b9f2d5..dd70172cf62 100644 --- a/pkg/acquisition/acquisition_test.go +++ b/pkg/acquisition/acquisition_test.go @@ -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 } @@ -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 } diff --git a/pkg/acquisition/modules/wineventlog/wineventlog_windows.go b/pkg/acquisition/modules/wineventlog/wineventlog_windows.go index 7be9932b21b..887be8b7dd3 100644 --- a/pkg/acquisition/modules/wineventlog/wineventlog_windows.go +++ b/pkg/acquisition/modules/wineventlog/wineventlog_windows.go @@ -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. @@ -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 { @@ -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) } diff --git a/pkg/acquisition/modules/wineventlog/wineventlog_windows_test.go b/pkg/acquisition/modules/wineventlog/wineventlog_windows_test.go index 8d3163fe0cd..2f6fe15450f 100644 --- a/pkg/acquisition/modules/wineventlog/wineventlog_windows_test.go +++ b/pkg/acquisition/modules/wineventlog/wineventlog_windows_test.go @@ -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) }