diff options
| author | Chris Lu <chrislusf@users.noreply.github.com> | 2025-07-16 23:39:27 -0700 |
|---|---|---|
| committer | GitHub <noreply@github.com> | 2025-07-16 23:39:27 -0700 |
| commit | 69553e5ba6d46ed924b0c3adc3f8d9666550999a (patch) | |
| tree | 7711c4d9fe1919d2c6eaa841779bcde6e24b0248 /weed/mq/client/pub_client/scheduler.go | |
| parent | a524b4f485ce5aa2f234c742bd7d1e75386f569b (diff) | |
| download | seaweedfs-69553e5ba6d46ed924b0c3adc3f8d9666550999a.tar.xz seaweedfs-69553e5ba6d46ed924b0c3adc3f8d9666550999a.zip | |
convert error fromating to %w everywhere (#6995)
Diffstat (limited to 'weed/mq/client/pub_client/scheduler.go')
| -rw-r--r-- | weed/mq/client/pub_client/scheduler.go | 10 |
1 files changed, 5 insertions, 5 deletions
diff --git a/weed/mq/client/pub_client/scheduler.go b/weed/mq/client/pub_client/scheduler.go index a768fa7f8..40e8014c6 100644 --- a/weed/mq/client/pub_client/scheduler.go +++ b/weed/mq/client/pub_client/scheduler.go @@ -137,7 +137,7 @@ func (p *TopicPublisher) doPublishToPartition(job *EachPartitionPublishJob) erro brokerClient := mq_pb.NewSeaweedMessagingClient(grpcConnection) stream, err := brokerClient.PublishMessage(context.Background()) if err != nil { - return fmt.Errorf("create publish client: %v", err) + return fmt.Errorf("create publish client: %w", err) } publishClient := &PublishClient{ SeaweedMessaging_PublishMessageClient: stream, @@ -154,12 +154,12 @@ func (p *TopicPublisher) doPublishToPartition(job *EachPartitionPublishJob) erro }, }, }); err != nil { - return fmt.Errorf("send init message: %v", err) + return fmt.Errorf("send init message: %w", err) } // process the hello message resp, err := stream.Recv() if err != nil { - return fmt.Errorf("recv init response: %v", err) + return fmt.Errorf("recv init response: %w", err) } if resp.Error != "" { return fmt.Errorf("init response error: %v", resp.Error) @@ -208,7 +208,7 @@ func (p *TopicPublisher) doPublishToPartition(job *EachPartitionPublishJob) erro Data: data, }, }); err != nil { - return fmt.Errorf("send publish data: %v", err) + return fmt.Errorf("send publish data: %w", err) } publishCounter++ atomic.StoreInt64(&publishedTsNs, data.TsNs) @@ -218,7 +218,7 @@ func (p *TopicPublisher) doPublishToPartition(job *EachPartitionPublishJob) erro } else { // CloseSend would cancel the context on the server side if err := publishClient.CloseSend(); err != nil { - return fmt.Errorf("close send: %v", err) + return fmt.Errorf("close send: %w", err) } } |
