Skip to content

Commit

Permalink
style: format
Browse files Browse the repository at this point in the history
  • Loading branch information
w-h-a committed Aug 29, 2024
1 parent 438ebb3 commit d419d6d
Showing 1 changed file with 5 additions and 5 deletions.
10 changes: 5 additions & 5 deletions broker/snssqs/snssqs.go
Original file line number Diff line number Diff line change
Expand Up @@ -95,24 +95,24 @@ func (b *snssqs) configure() error {
visibilityTimeout := defaultVisibilityTimeout

waitTimeSeconds := defaultWaitSeconds

if timeout, ok := GetVisibilityTimeoutFromContext(b.options.SubscribeOptions.Context); ok {
visibilityTimeout = timeout
}

if waitTime, ok := GetWaitTimeSecondsFromContext(b.options.SubscribeOptions.Context); ok {
waitTimeSeconds = waitTime
}

client := sqs.NewFromConfig(cfg)

url, err := client.GetQueueUrl(context.Background(), &sqs.GetQueueUrlInput{
QueueName: aws.String(b.options.SubscribeOptions.Group),
})
if err != nil {
return err
}

b.sqsClient = &sqsClient{client, url.QueueUrl, visibilityTimeout, waitTimeSeconds}
}

Expand Down

0 comments on commit d419d6d

Please sign in to comment.