Skip to content

Commit 2a1d98b

Browse files
committed
fix further golint issues
1 parent 7ef95e6 commit 2a1d98b

File tree

10 files changed

+12
-35
lines changed

10 files changed

+12
-35
lines changed

driver/generic/query_executor.go

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -50,7 +50,7 @@ func NewQueryExecutor(store goengine.EventStore, streamName goengine.StreamName,
5050
}
5151

5252
// Reset sets the executor to it's initial state
53-
func (e *QueryExecutor) Reset(ctx context.Context) {
53+
func (e *QueryExecutor) Reset(context.Context) {
5454
e.state = nil
5555
e.offset = 0
5656
}

driver/inmemory/eventstore.go

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -96,7 +96,7 @@ func (i *EventStore) Load(
9696
}
9797

9898
// AppendTo appends the provided messages to the stream
99-
func (i *EventStore) AppendTo(ctx context.Context, streamName goengine.StreamName, streamEvents []goengine.Message) error {
99+
func (i *EventStore) AppendTo(_ context.Context, streamName goengine.StreamName, streamEvents []goengine.Message) error {
100100
i.Lock()
101101
defer i.Unlock()
102102

driver/sql/postgres/projector_aggregate_bench_test.go

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -46,7 +46,7 @@ type (
4646
}
4747
)
4848

49-
func (*personProjection) Init(ctx context.Context) (interface{}, error) {
49+
func (*personProjection) Init(context.Context) (interface{}, error) {
5050
return nil, nil
5151
}
5252

@@ -183,7 +183,6 @@ func setup(
183183
},
184184
goengine.NopLogger,
185185
driverSQL.NopMetrics,
186-
0,
187186
)
188187
require.NoError(b, err, "failed to create aggregate projector")
189188

driver/sql/projection_notification_processor.go

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -58,7 +58,7 @@ func NewBackgroundProcessor(
5858
}
5959

6060
// Execute starts the background worker and wait for the notification to be executed
61-
func (b *ProjectionNotificationProcessor) Execute(ctx context.Context, handler ProcessHandler, notification *ProjectionNotification) error {
61+
func (b *ProjectionNotificationProcessor) Execute(ctx context.Context, handler ProcessHandler, _ *ProjectionNotification) error {
6262
// Wrap the processNotification in order to know that the first trigger finished
6363
handler, handlerDone := b.wrapProcessHandlerForSingleRun(handler)
6464

driver/sql/projector_aggregate.go

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,6 @@ import (
44
"context"
55
"database/sql"
66
"sync"
7-
"time"
87

98
"github.com/hellofresh/goengine/v2"
109
"github.com/hellofresh/goengine/v2/aggregate"
@@ -36,7 +35,6 @@ func NewAggregateProjector(
3635
projectionErrorHandler ProjectionErrorCallback,
3736
logger goengine.Logger,
3837
metrics Metrics,
39-
retryDelay time.Duration,
4038
) (*AggregateProjector, error) {
4139
switch {
4240
case db == nil:

extension/amqp/amqp_test.go

Lines changed: 5 additions & 19 deletions
Original file line numberDiff line numberDiff line change
@@ -15,15 +15,15 @@ import (
1515
type mockAcknowledger struct {
1616
}
1717

18-
func (ack mockAcknowledger) Ack(tag uint64, multiple bool) error {
18+
func (ack mockAcknowledger) Ack(uint64, bool) error {
1919
return nil
2020
}
2121

22-
func (ack mockAcknowledger) Nack(tag uint64, multiple bool, requeue bool) error {
22+
func (ack mockAcknowledger) Nack(uint64, bool, bool) error {
2323
return nil
2424
}
2525

26-
func (ack mockAcknowledger) Reject(tag uint64, requeue bool) error {
26+
func (ack mockAcknowledger) Reject(uint64, bool) error {
2727
return nil
2828
}
2929

@@ -37,25 +37,11 @@ func (cn mockConnection) Close() error {
3737
return nil
3838
}
3939

40-
func (ch mockChannel) Publish(
41-
exchange string,
42-
queue string,
43-
mandatory bool,
44-
immediate bool,
45-
msg amqp.Publishing,
46-
) error {
40+
func (ch mockChannel) Publish(string, string, bool, bool, amqp.Publishing) error {
4741
return nil
4842
}
4943

50-
func (ch mockChannel) Consume(
51-
queue,
52-
consumer string,
53-
autoAck,
54-
exclusive,
55-
noLocal,
56-
noWait bool,
57-
args amqp.Table,
58-
) (<-chan amqp.Delivery, error) {
44+
func (ch mockChannel) Consume(string, string, bool, bool, bool, bool, amqp.Table) (<-chan amqp.Delivery, error) {
5945
return make(chan amqp.Delivery), nil
6046
}
6147
func (ch mockChannel) Qos(int, int, bool) error {

extension/amqp/publisher.go

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -58,7 +58,7 @@ func NewNotificationPublisher(
5858
}
5959

6060
// Publish sends a ProjectionNotification to Queue
61-
func (p *NotificationPublisher) Publish(ctx context.Context, notification *sql.ProjectionNotification) error {
61+
func (p *NotificationPublisher) Publish(_ context.Context, notification *sql.ProjectionNotification) error {
6262
reconnectInterval := p.minReconnectInterval
6363
// Ignore nil notifications since this is not supported
6464
// Skipping as we may receive a nil notification from dispatcher for the first time

strategy/json/sql/postgres/manager.go

Lines changed: 0 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,6 @@ package postgres
22

33
import (
44
"database/sql"
5-
"time"
65

76
"github.com/hellofresh/goengine/v2"
87
driverSQL "github.com/hellofresh/goengine/v2/driver/sql"
@@ -121,7 +120,6 @@ func (m *SingleStreamManager) NewAggregateProjector(
121120
projection goengine.Projection,
122121
projectionErrorHandler driverSQL.ProjectionErrorCallback,
123122
useLockedField bool,
124-
retryDelay time.Duration,
125123
) (*driverSQL.AggregateProjector, error) {
126124
eventStore, err := m.NewEventStore()
127125
if err != nil {
@@ -153,6 +151,5 @@ func (m *SingleStreamManager) NewAggregateProjector(
153151
projectionErrorHandler,
154152
m.logger,
155153
m.metrics,
156-
retryDelay,
157154
)
158155
}

test/projector_aggregate_integration_test.go

Lines changed: 0 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -112,7 +112,6 @@ func (s *aggregateProjectorTestSuite) TestRunAndListen() {
112112
},
113113
s.GetLogger(),
114114
s.Metrics,
115-
0,
116115
)
117116
s.Require().NoError(err, "failed to create projector")
118117

@@ -211,7 +210,6 @@ func (s *aggregateProjectorTestSuite) TestRunAndListen() {
211210
},
212211
s.GetLogger(),
213212
s.Metrics,
214-
0,
215213
)
216214
s.Require().NoError(err, "failed to create projector")
217215

@@ -267,7 +265,6 @@ func (s *aggregateProjectorTestSuite) TestRun() {
267265
},
268266
s.GetLogger(),
269267
s.Metrics,
270-
0,
271268
)
272269
s.Require().NoError(err, "failed to create projector")
273270

test/projector_integration_test.go

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -41,7 +41,7 @@ type (
4141
}
4242
)
4343

44-
func (p *DepositedProjection) Init(ctx context.Context) (interface{}, error) {
44+
func (p *DepositedProjection) Init(context.Context) (interface{}, error) {
4545
return depositedProjectionState{}, nil
4646
}
4747

@@ -119,7 +119,7 @@ func (s *projectorSuite) SetupTest() {
119119
err = s.eventStore.Create(ctx, s.eventStream)
120120
s.Require().NoError(err, "failed on create event stream")
121121

122-
// Setup the projection tables etc.
122+
// Set up the projection tables etc.
123123
s.eventStoreTable, err = persistenceStrategy.GenerateTableName(s.eventStream)
124124
s.Require().NoError(err, "failed to generate eventstream table name")
125125
}

0 commit comments

Comments
 (0)