From b2c536c2e2d0f8e71e9b99f896c163f5b3bf966a Mon Sep 17 00:00:00 2001 From: Gabriel Cataldo Date: Tue, 19 Dec 2023 06:56:01 -0300 Subject: [PATCH] Refactor validate duration > 0 --- sqs/option/consumer.go | 8 ++++---- sqs/option/{http_client.go => http.go} | 0 2 files changed, 4 insertions(+), 4 deletions(-) rename sqs/option/{http_client.go => http.go} (100%) diff --git a/sqs/option/consumer.go b/sqs/option/consumer.go index 47e8736..f4099ae 100644 --- a/sqs/option/consumer.go +++ b/sqs/option/consumer.go @@ -138,22 +138,22 @@ func GetConsumerByParams(opts []Consumer) Consumer { if opt.DeleteMessageProcessedSuccess { result.DeleteMessageProcessedSuccess = opt.DeleteMessageProcessedSuccess } - if opt.ConsumerMessageTimeout.Seconds() > 0 { + if opt.ConsumerMessageTimeout > 0 { result.ConsumerMessageTimeout = opt.ConsumerMessageTimeout } - if opt.DelayQueryLoop.Seconds() > 0 { + if opt.DelayQueryLoop > 0 { result.DelayQueryLoop = opt.DelayQueryLoop } if opt.MaxNumberOfMessages > 0 { result.MaxNumberOfMessages = opt.MaxNumberOfMessages } - if opt.VisibilityTimeout.Seconds() > 0 { + if opt.VisibilityTimeout > 0 { result.VisibilityTimeout = opt.VisibilityTimeout } if opt.ReceiveRequestAttemptId != nil && len(*opt.ReceiveRequestAttemptId) != 0 { result.ReceiveRequestAttemptId = opt.ReceiveRequestAttemptId } - if opt.WaitTimeSeconds.Seconds() > 0 { + if opt.WaitTimeSeconds > 0 { result.WaitTimeSeconds = opt.WaitTimeSeconds } } diff --git a/sqs/option/http_client.go b/sqs/option/http.go similarity index 100% rename from sqs/option/http_client.go rename to sqs/option/http.go