You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@pulsar.apache.org by "gunli (via GitHub)" <gi...@apache.org> on 2023/06/25 11:45:35 UTC
[GitHub] [pulsar-client-go] gunli opened a new pull request, #1035: [Refactor] refactor duplicated code lines and fix typo errors
gunli opened a new pull request, #1035:
URL: https://github.com/apache/pulsar-client-go/pull/1035
<!--
### Contribution Checklist
- Name the pull request in the form "[Issue XYZ][component] Title of the pull request", where *XYZ* should be replaced by the actual issue number.
Skip *Issue XYZ* if there is no associated github issue for this pull request.
Skip *component* if you are unsure about which is the best component. E.g. `[docs] Fix typo in produce method`.
- Fill out the template below to describe the changes contributed by the pull request. That will give reviewers the context they need to do the review.
- Each pull request should address only one issue, not mix up code from multiple issues.
- Each commit in the pull request has a meaningful commit message
- Once all items of the checklist are addressed, remove the above text and this checklist, leaving only the filled out template below.
**(The sections below can be removed for hotfixes of typos)**
-->
*(If this PR fixes a github issue, please add `Fixes #<xyz>`.)*
Fixes #<xyz>
*(or if this PR is one task of a github issue, please add `Master Issue: #<xyz>` to link to the master issue.)*
Master Issue: #<xyz>
### Motivation
There duplicated code lines and typo errors in producer_partition.go, refactor them and run goimports.
### Modifications
- modified: integration-tests/pb/hello.pb.go
- modified: integration-tests/pb/hi.pb.go
- modified: pulsar/internal/pulsar_proto/PulsarApi.pb.go
- modified: pulsar/producer_partition.go
### Verifying this change
- [x] Make sure that the change passes the CI checks.
*(Please pick either of the following options)*
This change is a trivial rework / code cleanup without any test coverage.
*(or)*
This change is already covered by existing tests, such as *(please describe tests)*.
*(or)*
This change added tests and can be verified as follows:
*(example:)*
- *Added integration tests for end-to-end deployment with large payloads (10MB)*
- *Extended integration test for recovery after broker failure*
### Does this pull request potentially affect one of the following parts:
*If `yes` was chosen, please highlight the changes*
- Dependencies (does it add or upgrade a dependency): no)
- The public API: (no)
- The schema: (no)
- The default values of configurations: (no)
- The wire protocol: (no)
### Documentation
- Does this pull request introduce a new feature? (no)
- If yes, how is the feature documented? (not applicable / docs / GoDocs / not documented)
- If a feature is not applicable for documentation, explain why?
- If a feature is not documented yet in this PR, please create a followup issue for adding the documentation
--
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
To unsubscribe, e-mail: commits-unsubscribe@pulsar.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
[GitHub] [pulsar-client-go] gunli commented on a diff in pull request #1035: [Refactor] refactor duplicated code lines and fix typo errors
Posted by "gunli (via GitHub)" <gi...@apache.org>.
gunli commented on code in PR #1035:
URL: https://github.com/apache/pulsar-client-go/pull/1035#discussion_r1241390618
##########
integration-tests/pb/hello.pb.go:
##########
@@ -25,10 +25,11 @@
package __
import (
- protoreflect "google.golang.org/protobuf/reflect/protoreflect"
- protoimpl "google.golang.org/protobuf/runtime/protoimpl"
reflect "reflect"
sync "sync"
+
+ protoreflect "google.golang.org/protobuf/reflect/protoreflect"
+ protoimpl "google.golang.org/protobuf/runtime/protoimpl"
)
Review Comment:
I runned `golangci-lint run` and it tell me failed at goimport sort, so I runned `goimport -w .` and it modified these 2 files..., I will revert it.
--
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
To unsubscribe, e-mail: commits-unsubscribe@pulsar.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
[GitHub] [pulsar-client-go] gunli closed pull request #1035: [Refactor] refactor duplicated code lines and fix typo errors
Posted by "gunli (via GitHub)" <gi...@apache.org>.
gunli closed pull request #1035: [Refactor] refactor duplicated code lines and fix typo errors
URL: https://github.com/apache/pulsar-client-go/pull/1035
--
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
To unsubscribe, e-mail: commits-unsubscribe@pulsar.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
[GitHub] [pulsar-client-go] gunli commented on a diff in pull request #1035: [Refactor] refactor duplicated code lines and fix typo errors
Posted by "gunli (via GitHub)" <gi...@apache.org>.
gunli commented on code in PR #1035:
URL: https://github.com/apache/pulsar-client-go/pull/1035#discussion_r1241390618
##########
integration-tests/pb/hello.pb.go:
##########
@@ -25,10 +25,11 @@
package __
import (
- protoreflect "google.golang.org/protobuf/reflect/protoreflect"
- protoimpl "google.golang.org/protobuf/runtime/protoimpl"
reflect "reflect"
sync "sync"
+
+ protoreflect "google.golang.org/protobuf/reflect/protoreflect"
+ protoimpl "google.golang.org/protobuf/runtime/protoimpl"
)
Review Comment:
I runned `golangci-lint run` and it tell me failed at goimport sort, so I runned `goimport -w .` and it modified these 2 files...
--
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
To unsubscribe, e-mail: commits-unsubscribe@pulsar.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
[GitHub] [pulsar-client-go] RobertIndie commented on a diff in pull request #1035: [Refactor] refactor duplicated code lines and fix typo errors
Posted by "RobertIndie (via GitHub)" <gi...@apache.org>.
RobertIndie commented on code in PR #1035:
URL: https://github.com/apache/pulsar-client-go/pull/1035#discussion_r1241158304
##########
integration-tests/pb/hello.pb.go:
##########
@@ -25,10 +25,11 @@
package __
import (
- protoreflect "google.golang.org/protobuf/reflect/protoreflect"
- protoimpl "google.golang.org/protobuf/runtime/protoimpl"
reflect "reflect"
sync "sync"
+
+ protoreflect "google.golang.org/protobuf/reflect/protoreflect"
+ protoimpl "google.golang.org/protobuf/runtime/protoimpl"
)
Review Comment:
Why do you edit `*.pb.go` files? From the comment line 19:
```
// Code generated by protoc-gen-go. DO NOT EDIT.
// versions:
// protoc-gen-go v1.30.0
// protoc v3.21.12
// source: hello.proto
```
--
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
To unsubscribe, e-mail: commits-unsubscribe@pulsar.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org