Skip to content

Commit 8ba0f80

Browse files
[azeventhubs] Fixing referral to an internal constant in an example (Azure#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.
1 parent d6c27cb commit 8ba0f80

File tree

1 file changed

+1
-2
lines changed

1 file changed

+1
-2
lines changed

sdk/messaging/azeventhubs/example_consuming_with_checkpoints_test.go

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -12,7 +12,6 @@ import (
1212

1313
"github.com/Azure/azure-sdk-for-go/sdk/messaging/azeventhubs"
1414
"github.com/Azure/azure-sdk-for-go/sdk/messaging/azeventhubs/checkpoints"
15-
"github.com/Azure/azure-sdk-for-go/sdk/messaging/azeventhubs/internal/exported"
1615
"github.com/Azure/azure-sdk-for-go/sdk/storage/azblob/container"
1716
)
1817

@@ -118,7 +117,7 @@ func processEventsForPartition(partitionClient *azeventhubs.ProcessorPartitionCl
118117
if err != nil && !errors.Is(err, context.DeadlineExceeded) {
119118
var eventHubError *azeventhubs.Error
120119

121-
if errors.As(err, &eventHubError) && eventHubError.Code == exported.ErrorCodeOwnershipLost {
120+
if errors.As(err, &eventHubError) && eventHubError.Code == azeventhubs.ErrorCodeOwnershipLost {
122121
return nil
123122
}
124123

0 commit comments

Comments
 (0)