-
Notifications
You must be signed in to change notification settings - Fork 81
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
Go 1.22 #3567
Go 1.22 #3567
Conversation
This also changes workflows to test 1.22 and 1.23 only (refs. nspcc-dev/.github#30). Fixes #3310. Signed-off-by: Roman Khimov <[email protected]>
LIkely it's more readable this way. Signed-off-by: Roman Khimov <[email protected]>
Signed-off-by: Roman Khimov <[email protected]>
It's slightly less efficient (all comparisons are always made), but for strings/ints it's negligible performance difference, while the code looks a tiny bit better. Signed-off-by: Roman Khimov <[email protected]>
Mostly this switches to math/rand/v2, but sometimes randomness is not really needed. Signed-off-by: Roman Khimov <[email protected]>
Signed-off-by: Roman Khimov <[email protected]>
It's a bit easier this way, loops that change slices aren't fun. Signed-off-by: Roman Khimov <[email protected]>
Mostly it's about Go 1.22+ syntax with ranging over integers, but it also prefers ranging over slices where possible (it makes code a little better to read). Notice that we have a number of dangerous loops where slices are mutated during loop execution, many of these can't be converted since we need proper length evalutation at every iteration. Signed-off-by: Roman Khimov <[email protected]>
It's unused. Maybe we can move it out of VM completely decoupling VM from crypto. Signed-off-by: Roman Khimov <[email protected]>
Codecov ReportAttention: Patch coverage is
Additional details and impacted files@@ Coverage Diff @@
## master #3567 +/- ##
=======================================
Coverage 85.79% 85.79%
=======================================
Files 330 330
Lines 38539 38537 -2
=======================================
- Hits 33063 33062 -1
+ Misses 3930 3928 -2
- Partials 1546 1547 +1 ☔ View full report in Codecov by Sentry. |
Go 1.22+ allows to drop these: The copy of the 'for' variable "i" can be deleted (Go 1.22+) (copyloopvar) Signed-off-by: Roman Khimov <[email protected]>
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 tried, but can't find anything suspicious or questionable.
No description provided.