-
Notifications
You must be signed in to change notification settings - Fork 54
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鈥檒l occasionally send you account related emails.
Already on GitHub? Sign in to your account
Replace the deprecated function rand.Seed #358
Comments
@cloudxxx8 , thanks for creating this. There is also other use of math/rand that needs to be replaced also with the seed code. |
We should use another random generator [2023-03-31T01:27:32.857Z] internal/driver/helper.go:121:18: G404: Use of weak random number generator (math/rand instead of crypto/rand) (gosec) |
According to golang/go#54880, the generator is seeded randomly at program startup now. Should we just remove |
Yes, please remove it in this case |
the generator is seeded randomly at program startup now, so remove the Seed function close edgexfoundry#358 Signed-off-by: Ginny Guan <ginny@iotechsys.com>
the generator is seeded randomly at program startup now, so remove the Seed function close edgexfoundry#358 Signed-off-by: Ginny Guan <ginny@iotechsys.com> d Signed-off-by: Ginny Guan <ginny@iotechsys.com>
馃殌 Feature Request
Relevant Package [REQUIRED]
This feature request is for device-virtualDescription [REQUIRED]
rand.Seed function is deprecated in golang v1.20
https://pkg.go.dev/math/rand#Seed
We had better replace the usage in this repository
Describe the solution you'd like
Try to use Rand.Seed instead
https://pkg.go.dev/math/rand#Rand.Seed
The text was updated successfully, but these errors were encountered: