[8.x](backport #42025) feat(libbeat): use math/rand/v2 and drop seed init#42441
Merged
[8.x](backport #42025) feat(libbeat): use math/rand/v2 and drop seed init#42441
Conversation
* feat(libbeat): use math/rand/v2 and drop seed init Since go 1.20 the rand package automatically seeds the global random number generator with a random value. remove deprecate methods and use rand v2 api in libbeat * ci: bump golangci-lint to fix errors * ci(golangci): remove skip-go-installation option it was removed in v4 * Update golangci-lint.yml * Update golangci-lint.yml * Update golangci-lint.yml * lint: replace rand with t tempdir * Update client_integration_test.go * lint: fix linter issues * lint: fix linter issues * Apply suggestions from code review Co-authored-by: Dan Kortschak <dan.kortschak@elastic.co> --------- Co-authored-by: Dan Kortschak <dan.kortschak@elastic.co> (cherry picked from commit 12c36bd)
Contributor
Author
|
This pull request has not been merged yet. Could you please review and merge it @kruskall? 🙏 |
1 similar comment
Contributor
Author
|
This pull request has not been merged yet. Could you please review and merge it @kruskall? 🙏 |
Contributor
|
Pinging @elastic/elastic-agent-data-plane (Team:Elastic-Agent-Data-Plane) |
rdner
approved these changes
Feb 14, 2025
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.
Proposed commit message
Since go 1.20 the rand package automatically seeds the global random number generator with a random value.
remove deprecate methods and use rand v2 api in libbeat
Checklist
CHANGELOG.next.asciidocorCHANGELOG-developer.next.asciidoc.Disruptive User Impact
Author's Checklist
How to test this PR locally
Related issues
Use cases
Screenshots
Logs
This is an automatic backport of pull request #42025 done by [Mergify](https://mergify.com).