From b3c445f779129b0cca538d960e722bc48aa4c494 Mon Sep 17 00:00:00 2001 From: Nathanael DEMACON Date: Fri, 14 Apr 2023 11:14:30 +0200 Subject: [PATCH] Expose `ErrDeliveryNotInitialized` variable --- delivery.go | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/delivery.go b/delivery.go index e94cf34..6fb73ed 100644 --- a/delivery.go +++ b/delivery.go @@ -10,7 +10,7 @@ import ( "time" ) -var errDeliveryNotInitialized = errors.New("delivery not initialized") +var ErrDeliveryNotInitialized = errors.New("delivery not initialized") // Acknowledger notifies the server of successful or failed consumption of // deliveries via identifier found in the Delivery.DeliveryTag field. @@ -122,7 +122,7 @@ delivery that is not automatically acknowledged. */ func (d Delivery) Ack(multiple bool) error { if d.Acknowledger == nil { - return errDeliveryNotInitialized + return ErrDeliveryNotInitialized } return d.Acknowledger.Ack(d.DeliveryTag, multiple) } @@ -142,7 +142,7 @@ delivery that is not automatically acknowledged. */ func (d Delivery) Reject(requeue bool) error { if d.Acknowledger == nil { - return errDeliveryNotInitialized + return ErrDeliveryNotInitialized } return d.Acknowledger.Reject(d.DeliveryTag, requeue) } @@ -167,7 +167,7 @@ delivery that is not automatically acknowledged. */ func (d Delivery) Nack(multiple, requeue bool) error { if d.Acknowledger == nil { - return errDeliveryNotInitialized + return ErrDeliveryNotInitialized } return d.Acknowledger.Nack(d.DeliveryTag, multiple, requeue) }