From 8ba0f8054d505231ca97a35484c6e1fe371e6787 Mon Sep 17 00:00:00 2001 From: Richard Park <51494936+richardpark-msft@users.noreply.github.com> Date: Fri, 24 Mar 2023 13:14:53 -0700 Subject: [PATCH] [azeventhubs] Fixing referral to an internal constant in an example (#20466) A customer noticed our example file refers to an constant ErrorCodeOwnershipLost by it's internal/exported name. This is some fallout from the way that we expose the constants using aliases, and autocomplete. --- .../azeventhubs/example_consuming_with_checkpoints_test.go | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/sdk/messaging/azeventhubs/example_consuming_with_checkpoints_test.go b/sdk/messaging/azeventhubs/example_consuming_with_checkpoints_test.go index bfc6b4517fc0..1e4243cbafc1 100644 --- a/sdk/messaging/azeventhubs/example_consuming_with_checkpoints_test.go +++ b/sdk/messaging/azeventhubs/example_consuming_with_checkpoints_test.go @@ -12,7 +12,6 @@ import ( "github.com/Azure/azure-sdk-for-go/sdk/messaging/azeventhubs" "github.com/Azure/azure-sdk-for-go/sdk/messaging/azeventhubs/checkpoints" - "github.com/Azure/azure-sdk-for-go/sdk/messaging/azeventhubs/internal/exported" "github.com/Azure/azure-sdk-for-go/sdk/storage/azblob/container" ) @@ -118,7 +117,7 @@ func processEventsForPartition(partitionClient *azeventhubs.ProcessorPartitionCl if err != nil && !errors.Is(err, context.DeadlineExceeded) { var eventHubError *azeventhubs.Error - if errors.As(err, &eventHubError) && eventHubError.Code == exported.ErrorCodeOwnershipLost { + if errors.As(err, &eventHubError) && eventHubError.Code == azeventhubs.ErrorCodeOwnershipLost { return nil }