Skip to content

Commit

Permalink
🎨 Combine varieable definitions to improve readability
Browse files Browse the repository at this point in the history
  • Loading branch information
krishnamurthypranesh committed May 11, 2022
1 parent 3d6fe2e commit 7f55516
Showing 1 changed file with 3 additions and 4 deletions.
7 changes: 3 additions & 4 deletions publisher/sns/sns.go
Original file line number Diff line number Diff line change
Expand Up @@ -77,15 +77,14 @@ func (p *Publisher) PublishBatch(ctx context.Context, msgs []models.Message) (ma

errorCount int64
successCount int64
)

isFifo := strings.Contains(strings.ToLower(p.cfg.TopicArn), "fifo")

var (
numPublishedMessages = 0
start = 0
end = constants.MaxBatchSize
)

isFifo := strings.Contains(strings.ToLower(p.cfg.TopicArn), "fifo")

if end > len(msgs) {
end = len(msgs)
}
Expand Down

0 comments on commit 7f55516

Please sign in to comment.