Skip to content

Commit

Permalink
style: make linter happy
Browse files Browse the repository at this point in the history
Signed-off-by: Samantha Coyle <[email protected]>
  • Loading branch information
sicoyle committed Nov 20, 2024
1 parent add4a99 commit 16834ed
Show file tree
Hide file tree
Showing 5 changed files with 4 additions and 4 deletions.
2 changes: 1 addition & 1 deletion common/authentication/aws/x509.go
Original file line number Diff line number Diff line change
Expand Up @@ -463,7 +463,7 @@ func (a *x509) refreshClient() {
for {
newSession, err := a.createOrRefreshSession(context.Background())
if err == nil {
err := a.clients.refresh(newSession)
err = a.clients.refresh(newSession)
if err != nil {
a.logger.Errorf("Failed to refresh client, retrying in 5 seconds: %w", err)
}
Expand Down
1 change: 1 addition & 0 deletions common/component/kafka/clients.go
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,7 @@ import (
"fmt"

"github.com/IBM/sarama"

awsAuth "github.com/dapr/components-contrib/common/authentication/aws"
)

Expand Down
1 change: 0 additions & 1 deletion common/component/kafka/kafka.go
Original file line number Diff line number Diff line change
Expand Up @@ -124,7 +124,6 @@ func NewKafka(logger logger.Logger) *Kafka {
}
}


// Init does metadata parsing and connection establishment.
func (k *Kafka) Init(ctx context.Context, metadata map[string]string) error {
upgradedMetadata, err := k.upgradeMetadata(metadata)
Expand Down
2 changes: 1 addition & 1 deletion common/component/kafka/kafka_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -421,7 +421,7 @@ func TestValidateAWS(t *testing.T) {
} else {
require.NoError(t, err)
}
assert.Equal(t, result, tt.expected)
assert.Equal(t, tt.expected, result)
})
}
}
2 changes: 1 addition & 1 deletion common/component/kafka/producer.go
Original file line number Diff line number Diff line change
Expand Up @@ -93,7 +93,7 @@ func (k *Kafka) Publish(_ context.Context, topic string, data []byte, metadata m
func (k *Kafka) BulkPublish(_ context.Context, topic string, entries []pubsub.BulkMessageEntry, metadata map[string]string) (pubsub.BulkPublishResponse, error) {
clients, err := k.latestClients()
if err != nil || clients == nil {
err := fmt.Errorf("failed to get latest Kafka clients: %w", err)
err = fmt.Errorf("failed to get latest Kafka clients: %w", err)
return pubsub.NewBulkPublishResponse(entries, err), err
}
if clients.producer == nil {
Expand Down

0 comments on commit 16834ed

Please sign in to comment.