Repository navigation
chore: Remove deprecated rand.Seed() calls - #16824
Merged
Merged
Conversation
|
Skipping CI for Draft Pull Request. |
Contributor
Author
|
/test all |
guzalv
force-pushed
the
master-base/gualvare/remove-deprecated-rand-seed
branch
from
September 15, 2025 13:56
c8f341b to
fe3fb9a
Compare
guzalv
force-pushed
the
master-base/gualvare/remove-deprecated-rand-seed
branch
from
September 15, 2025 14:01
fe3fb9a to
11cc9d4
Compare
Contributor
|
Images are ready for the commit at 6d0c221. To use with deploy scripts, first |
guzalv
force-pushed
the
master-base/gualvare/remove-deprecated-rand-seed
branch
from
September 16, 2025 07:38
11cc9d4 to
ba5d8de
Compare
Codecov Report✅ All modified and coverable lines are covered by tests. Additional details and impacted files@@ Coverage Diff @@
## master #16824 +/- ##
==========================================
- Coverage 48.97% 48.96% -0.01%
==========================================
Files 2690 2690
Lines 201445 201445
==========================================
- Hits 98650 98642 -8
- Misses 95144 95150 +6
- Partials 7651 7653 +2
Flags with carried forward coverage won't be shown. Click here to find out more. ☔ View full report in Codecov by Sentry. 🚀 New features to boost your workflow:
|
See https://pkg.go.dev/math/rand@go1.25.1#Seed: Deprecated: As of Go 1.20 there is no reason to call Seed with a random value. Programs that call Seed with a known value to get a specific sequence of results should use New(NewSource(seed)) to obtain a local random generator.
guzalv
force-pushed
the
master-base/gualvare/remove-deprecated-rand-seed
branch
from
September 16, 2025 09:44
ba5d8de to
6d0c221
Compare
guzalv
marked this pull request as ready for review
September 16, 2025 09:45
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Description
As of Go 1.20 rand.Seed() has been deprecated (see Go docs), and linters point it out (e.g. those run by the pre-commit hook):
This PR removes the Seed() calls with random values, and implements the recommended change where non-random seed values were used.
User-facing documentation
Testing and quality
Automated testing
How I validated my change
CI