Fix lint issues across the file
Fix lint issues across the file Signed-off-by: mecoding1 <118708378+mecoding1@users.noreply.github.com>
This commit is contained in:
parent
a7d1e9e250
commit
64b1a599ca
|
|
@ -133,7 +133,7 @@ func subscribeHandler(ctx context.Context, topic string, getAllProperties bool,
|
|||
for key, value := range e.Properties {
|
||||
if str, ok := value.(string); ok {
|
||||
res.Metadata[key] = str
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
|
@ -636,11 +636,11 @@ func (aeh *AzureEventHubs) Subscribe(subscribeCtx context.Context, req pubsub.Su
|
|||
}
|
||||
|
||||
getAllProperties := false
|
||||
if req.Metadata[requireAllProperties] != ""{
|
||||
if req.Metadata[requireAllProperties] != "" {
|
||||
getAllProperties, err = strconv.ParseBool(req.Metadata[requireAllProperties])
|
||||
if err!=nil{
|
||||
aeh.logger.Errorf("invalid value for metadata : %s . Error: %v.", requireAllProperties, err)
|
||||
}
|
||||
if err != nil {
|
||||
aeh.logger.Errorf("invalid value for metadata : %s . Error: %v.", requireAllProperties, err)
|
||||
}
|
||||
}
|
||||
|
||||
aeh.logger.Debugf("registering handler for topic %s", req.Topic)
|
||||
|
|
@ -648,10 +648,10 @@ func (aeh *AzureEventHubs) Subscribe(subscribeCtx context.Context, req pubsub.Su
|
|||
func(_ context.Context, e *eventhub.Event) error {
|
||||
// This component has built-in retries because Event Hubs doesn't support N/ACK for messages
|
||||
b := aeh.backOffConfig.NewBackOffWithContext(subscribeCtx)
|
||||
|
||||
|
||||
retryerr := retry.NotifyRecover(func() error {
|
||||
aeh.logger.Debugf("Processing EventHubs event %s/%s", req.Topic, e.ID)
|
||||
|
||||
|
||||
return subscribeHandler(subscribeCtx, req.Topic, getAllProperties, e, handler)
|
||||
}, b, func(_ error, _ time.Duration) {
|
||||
aeh.logger.Warnf("Error processing EventHubs event: %s/%s. Retrying...", req.Topic, e.ID)
|
||||
|
|
|
|||
Loading…
Reference in New Issue