-
Notifications
You must be signed in to change notification settings - Fork 9.8k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
pkg: address golangci var-naming issues #17584
pkg: address golangci var-naming issues #17584
Conversation
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
LGTM - Just one question about which approach we use to fix grpc_testing
below.
@@ -50,7 +50,7 @@ import ( | |||
"go.etcd.io/etcd/client/pkg/v3/transport" | |||
"go.etcd.io/etcd/client/pkg/v3/types" | |||
clientv3 "go.etcd.io/etcd/client/v3" | |||
"go.etcd.io/etcd/pkg/v3/grpc_testing" | |||
grpctesting "go.etcd.io/etcd/pkg/v3/grpc_testing" |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Should we consider changing this at a lower level and rename etcd/pkg/grpc_testing
to etcd/pkg/grpctesting
?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Agree to rename etcd/pkg/grpc_testing
to etcd/pkg/grpctesting
. It's only used by test, so it should be fine to rename it although it's public.
The package was introduced in #12667. I guess the naming just follows the package used by grpc-go: google.golang.org/grpc/test/grpc_testing
.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I'll rename the package. Reference to Go best practice: https://go.dev/blog/package-names, where revive complains about underscores in package names: https://github.com/mgechev/revive/blob/ef34f92/rule/var-naming.go#L66-L72. Unfortunately, revive doesn't provide a website with its rules.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Done
Signed-off-by: Ivan Valdes <ivan@vald.es>
83113be
to
d98ff0d
Compare
/ok-to-test |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
lgtm
@ivanvc Please rebase this PR since we merged lots of PRs recently. cc @serathius |
Addresses the
var-naming
issues inpkg
.grpc_testing
module togrpctesting
GrpcRecorder
struct toGRPCRecorder
Part of #17578
Please read https://github.com/etcd-io/etcd/blob/main/CONTRIBUTING.md#contribution-flow.