Skip to content
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

refactor: use rand.New(rand.NewSource) instead of deprecated rand.Seed #25279

Open
wants to merge 1 commit into
base: master-1.x
Choose a base branch
from

Conversation

chengshiwen
Copy link

Describe your proposed changes here.

  • I've read the contributing section of the project README.
  • Signed CLA (if not already signed).

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.

@chengshiwen chengshiwen changed the title Refactor: use rand.New(rand.NewSource) instead of deprecated rand.Seed refactor: use rand.New(rand.NewSource) instead of deprecated rand.Seed Sep 1, 2024
@chengshiwen
Copy link
Author

@davidby-influx @gwossum

@chengshiwen
Copy link
Author

Please review, thanks so much.
@bnpfeife @jdstrand @devanbenz

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

1 participant