Skip to content

Commit

Permalink
Implement PR review suggestions
Browse files Browse the repository at this point in the history
  • Loading branch information
belimawr committed Apr 12, 2024
1 parent 81e6cc7 commit 45fa1e3
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 3 deletions.
3 changes: 1 addition & 2 deletions libbeat/publisher/pipeline/pipeline_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -98,8 +98,7 @@ func makeDiscardQueue() queue.Queue {
// count is a counter that increments on every published event
// it's also the returned Event ID
count := uint64(0)
var producer *testProducer
producer = &testProducer{
producer := &testProducer{
publish: func(try bool, event interface{}) (queue.EntryID, bool) {

Check failure on line 102 in libbeat/publisher/pipeline/pipeline_test.go

View workflow job for this annotation

GitHub Actions / lint (windows)

cannot use func(try bool, event interface{}) (queue.EntryID, bool) {…} (value of type func(try bool, event interface{}) (queue.EntryID, bool)) as func(try bool, event queue.Entry) (queue.EntryID, bool) value in struct literal (typecheck)

Check failure on line 102 in libbeat/publisher/pipeline/pipeline_test.go

View workflow job for this annotation

GitHub Actions / lint (linux)

cannot use func(try bool, event interface{}) (queue.EntryID, bool) {…} (value of type func(try bool, event interface{}) (queue.EntryID, bool)) as func(try bool, event queue.Entry) (queue.EntryID, bool) value in struct literal (typecheck)
count++
return queue.EntryID(count), true
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -68,7 +68,7 @@ func (n *input) Run(runCtx v2.Context, connector beat.PipelineConnector) (err er
EventListener: NewTxACKHandler(),
})
if err != nil {
return fmt.Errorf("could not connect to publishing pipeline: %s", err)
return fmt.Errorf("could not connect to publishing pipeline: %w", err)
}
defer client.Close()

Expand Down

0 comments on commit 45fa1e3

Please sign in to comment.