From 0958e756685cb0fbdaa57631b0fedfcdf821961a Mon Sep 17 00:00:00 2001 From: mhmtszr Date: Mon, 20 Mar 2023 13:03:35 +0300 Subject: [PATCH] Fix lint --- kafka/producer/producer.go | 8 +++++++- kafka/producer/producer_batch.go | 9 ++++++++- 2 files changed, 15 insertions(+), 2 deletions(-) diff --git a/kafka/producer/producer.go b/kafka/producer/producer.go index b4e9e45..3163e4d 100644 --- a/kafka/producer/producer.go +++ b/kafka/producer/producer.go @@ -50,7 +50,13 @@ func NewProducer(config *config.Kafka, logger logger.Logger, errorLogger logger. writer.Transport = transport } return &producer{ - producerBatch: newProducerBatch(config.ProducerBatchTickerDuration, writer, config.ProducerBatchSize, logger, errorLogger, dcpCheckpointCommit), + producerBatch: newProducerBatch( + config.ProducerBatchTickerDuration, + writer, + config.ProducerBatchSize, + logger, + errorLogger, + dcpCheckpointCommit), } } diff --git a/kafka/producer/producer_batch.go b/kafka/producer/producer_batch.go index 0423adc..a3fbf34 100644 --- a/kafka/producer/producer_batch.go +++ b/kafka/producer/producer_batch.go @@ -24,7 +24,14 @@ type producerBatch struct { flushLock sync.Mutex } -func newProducerBatch(batchTime time.Duration, writer *kafka.Writer, batchLimit int, logger logger.Logger, errorLogger logger.Logger, dcpCheckpointCommit func()) *producerBatch { +func newProducerBatch( + batchTime time.Duration, + writer *kafka.Writer, + batchLimit int, + logger logger.Logger, + errorLogger logger.Logger, + dcpCheckpointCommit func(), +) *producerBatch { batch := &producerBatch{ batchTickerDuration: batchTime, batchTicker: time.NewTicker(batchTime),