-
Notifications
You must be signed in to change notification settings - Fork 867
refactor: omit unnecessary reassignment #7260
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
base: master
Are you sure you want to change the base?
Conversation
Signed-off-by: quantpoet <quantway@outlook.com>
|
sorry, there was a few lint issues, do you mind addressing? |
lint...
simulation/replication/worker/cmd/main.go
(118, 48) https://revive.run/r#range-val-in-closure loop variable domainName captured by func literal
service/matching/tasklist/task_reader.go
(140, 29) https://revive.run/r#range-val-in-closure loop variable g captured by func literal
✖ 2 problems (2 errors) (0 warnings)
make[1]: *** [Makefile:397: .build/code-lint] Error 1
make: *** [Makefile:461: lint] Error 2Hi, I checked the failed lint and found that it seems to be a bug in the lint tool. As mentioned on the page ,
Our project's Go version is above 1.22. Directory: cmd/server, Go version: 1.23.0
Directory: common/archiver/gcloud, Go version: 1.23.0
Directory: internal/tools, Go version: 1.22
Directory: service/sharddistributor/store/etcd, Go version: 1.23.0So, we can ignore the failure of this CI, and I will also file an issue for this tool. |
|
|
Let's update the linter, I guess it is outdated since the issue fixed in 1.5+ year ago. |
Yes, according to the author's response, the current version being used was released on 2023-05-16. I have upgraded it in this PR; please review. #7273 |
Yes, the CI errors here can be ignored. |
What changed?
The new version of Go has been optimized, and variables do not need to be reassigned.
Why?
How did you test it?
Potential risks
Release notes
Documentation Changes