-
Notifications
You must be signed in to change notification settings - Fork 87
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
fix: replace deprecated rand.Seed
#1436
Conversation
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.
LGTM. @ksamoray can you please have a look at this?
Already did - but would rather wait to have a CI for acceptance tests before merging this (and few of the other changes). |
@vmware/terraform-provider-nsxt-maintainers: reminder. |
fcf92c6
to
ca53e0b
Compare
`rand.Seed` has been deprecated since Go 1.20 and an alternative has been available since Go 1.0. 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. Signed-off-by: Ryan Johnson <ryan.johnson@broadcom.com>
ca53e0b
to
115a29e
Compare
@ksamoray If possible can we run acceptance tests for this PR, so we can merge it? |
@tenthirtyam, you must sign every commit in this pull request acknowledging our Developer Certificate of Origin before your changes are merged. This can be done by adding
|
/test-all |
@tenthirtyam, you must sign every commit in this pull request acknowledging our Developer Certificate of Origin before your changes are merged. This can be done by adding
|
/test-all |
Summary
rand.Seed
has been deprecated since Go 1.20 and an alternative has been available since Go 1.0.As of Go 1.20 there is no reason to call
Seed
with a random value. Programs that callSeed
with a known value to get a specific sequence of results should useNew(NewSource(seed))
to obtain a local random generator.