refactor: use slices.Backward to simplify the code#5227
refactor: use slices.Backward to simplify the code#5227chuanshanjida wants to merge 1 commit intoava-labs:masterfrom
Conversation
|
Hi @chuanshanjida -- you will need to sign your commits to make a contribution to this repository. Please let me know if you have any questions! |
Signed-off-by: chuanshanjida <chuanshanjida@outlook.com>
@JonathanOppenheimer Thanks! Signed. Please review it again. |
|
@joshua-kim Hi,Why did you close this PR? |
|
These are one-of trivial cosmetic improvements that do not meaningfully improve code quality, I would be interested in this if we could add it through a linter. Otherwise this is not a good use of our review bandwidth. |
we can, there's a modernize linter we have, which is commented out and not activated. @chuanshanjida maybe that's a task you could take a crack at? |
|
See Line 74 in 0937d45 |
Sure, I’d be happy to do this. I’ll open a new PR later. Thanks for your explanations and suggestions. |
|
@JonathanOppenheimer The new pr. #5231 Thanks |
You have to actually make the lint changes when you enable the linter haha. |
Added. It looks like a lot of changes😅… but I searched, and it seems this is an official tool provided by Go, so accuracy is likely fine. I’ll keep an eye on the unit tests at all times. |
Why this should be merged
There is a new function added in the go1.23 standard library, which can make the code more concise and easy to read.
More info can see golang/go#61899
How this works
How this was tested
Need to be documented in RELEASES.md?