-
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
client: address golangci var-naming issues #17582
client: address golangci var-naming issues #17582
Conversation
/retest |
/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
Thanks
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 - Thanks for raising these as smaller pr's for each package 🙏🏻
@@ -17,19 +17,19 @@ package logutil | |||
import "fmt" | |||
|
|||
const ( | |||
JsonLogFormat = "json" |
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.
The only concern is this is a public/exported const. Probably we should
- deprecate the existing name and plan to remove it in next major or minor release and skip the linter for this const;
- add a new const
JSONLogFormat
.
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, I deprecated JsonLogFormat
.
Signed-off-by: Ivan Valdes <[email protected]>
2607ad0
to
578b784
Compare
If we need to deprecate rather than rename an exported variable, we can add an ignore to the linter for that line.
Renamed exported variable:
logutil.JsonLogFormat
->logutil.JSONLogFormat
Renamed exported variables from internal packages:
endpoint.CREDS_REQUIRE
->endpoint.CredsRequire
endpoint.CREDS_DROP
->endpoint.CredsDrop
endpoint.CREDS_OPTIONAL
->endpoint.CredsOptional
Exported renamed variables to unexported as they weren't being used anywhere outside their package:
verify.ENV_VERIFY
->verify.envVerify
verify.ENV_VERIFY_VALUE_ALL
->verify.envVerifyValueAll
verify.ENV_VERIFY_VALUE_ASSERT
->verify.envVerifyValueAssert
After addressing these, the var-naming rule passes in the
client
directory.Relates to #17578
Please read https://github.com/etcd-io/etcd/blob/main/CONTRIBUTING.md#contribution-flow.