Skip to content

Commit

Permalink
chore: fix lint
Browse files Browse the repository at this point in the history
  • Loading branch information
Abdulsametileri committed Aug 5, 2024
1 parent b47cbb7 commit 76a6a0c
Show file tree
Hide file tree
Showing 3 changed files with 5 additions and 4 deletions.
6 changes: 3 additions & 3 deletions batch_consumer_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -34,7 +34,7 @@ func Test_batchConsumer_startBatch(t *testing.T) {
concurrency: 1,
},
messageGroupLimit: 3,
consumeFn: func(messages []*Message) error {
consumeFn: func(_ []*Message) error {
numberOfBatch++
return nil
},
Expand Down Expand Up @@ -101,7 +101,7 @@ func Test_batchConsumer_startBatch_with_preBatch(t *testing.T) {
concurrency: 1,
},
messageGroupLimit: 2,
consumeFn: func(messages []*Message) error {
consumeFn: func(_ []*Message) error {
numberOfBatch++
return nil
},
Expand Down Expand Up @@ -179,7 +179,7 @@ func Test_batchConsumer_process(t *testing.T) {
gotOnlyOneTimeException := true
bc := batchConsumer{
base: &base{metric: &ConsumerMetric{}, transactionalRetry: true, logger: NewZapLogger(LogLevelDebug)},
consumeFn: func(messages []*Message) error {
consumeFn: func(_ []*Message) error {
if gotOnlyOneTimeException {
gotOnlyOneTimeException = false
return errors.New("simulate only one time exception")
Expand Down
1 change: 1 addition & 0 deletions consumer_base.go
Original file line number Diff line number Diff line change
Expand Up @@ -203,6 +203,7 @@ func (c *base) startConsume() {
}

c.metric.TotalErrorCountDuringFetchingMessage++
//nolint:lll
c.logger.Warnf("Message could not read, err %s, from topics %s with consumer group %s", err.Error(), c.consumerCfg.getTopics(), c.consumerCfg.Reader.GroupID)
continue
}
Expand Down
2 changes: 1 addition & 1 deletion consumer_config_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -98,7 +98,7 @@ func TestConsumerConfig_newCronsumerConfig(t *testing.T) {
// Given
cfg := ConsumerConfig{
RetryConfiguration: RetryConfiguration{
SkipMessageByHeaderFn: func(headers []Header) bool {
SkipMessageByHeaderFn: func(_ []Header) bool {
return false
},
},
Expand Down

0 comments on commit 76a6a0c

Please sign in to comment.