Skip to content

Commit

Permalink
binding.eventhub: rename AzureEventshub local var
Browse files Browse the repository at this point in the history
Signed-off-by: Christian Leinweber <[email protected]>
  • Loading branch information
christle committed Aug 7, 2022
1 parent c0b1131 commit 4257517
Showing 1 changed file with 6 additions and 6 deletions.
12 changes: 6 additions & 6 deletions bindings/azure/eventhubs/eventhubs.go
Original file line number Diff line number Diff line change
Expand Up @@ -155,20 +155,20 @@ func validate(connectionString string) error {
return err
}

func (aeh *AzureEventHubs) getStoragePrefixString() (string, error) {
hubName, err := aeh.validateAndGetHubName()
func (a *AzureEventHubs) getStoragePrefixString() (string, error) {
hubName, err := a.validateAndGetHubName()
if err != nil {
return "", err
}

// empty string in the end of slice to have a suffix "-".
return strings.Join([]string{"dapr", hubName, aeh.metadata.consumerGroup, ""}, "-"), nil
return strings.Join([]string{"dapr", hubName, a.metadata.consumerGroup, ""}, "-"), nil
}

func (aeh *AzureEventHubs) validateAndGetHubName() (string, error) {
hubName := aeh.metadata.eventHubName
func (a *AzureEventHubs) validateAndGetHubName() (string, error) {
hubName := a.metadata.eventHubName
if hubName == "" {
parsed, err := conn.ParsedConnectionFromStr(aeh.metadata.connectionString)
parsed, err := conn.ParsedConnectionFromStr(a.metadata.connectionString)
if err != nil {
return "", err
}
Expand Down

0 comments on commit 4257517

Please sign in to comment.