-
Notifications
You must be signed in to change notification settings - Fork 5
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
all: bump golangci-lint to v1.51.1, test against Go v1.20, drop support for Go v1.18 #52
Conversation
419f285
to
ec825aa
Compare
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.
Error: network.go:19:9: SA1019: rand.Read has been deprecated since Go 1.20 because it shouldn't be used: For almost all use cases, crypto/rand.Read is more appropriate. (staticcheck)
_, _ = rand.Read(hw)
Let's use crypto/rand.Read
.
The |
v1.51 brings support for Go v1.20. See below the for the changelog: https://github.com/golangci/golangci-lint/releases/tag/v1.51.0 https://github.com/golangci/golangci-lint/releases/tag/v1.51.1 Signed-off-by: Robin Hahling <[email protected]>
Signed-off-by: Robin Hahling <[email protected]>
ec825aa
to
d73226c
Compare
That's fair, and furthermore our usage doesn't fall under "almost all use cases" either. To be clear, I'm only concerned about
FWIW I don't think we need a CSPRNG, non-crypto will do just fine as long as it is fast. Last time I checked the PRNG was the bottleneck when generating random flows from multiple goroutines (because the current implementation uses |
Right, only
It actually means their use is discouraged but they won't be removed because this would break the Go compatibility promise (actual removal would require a Go 2 release) so I'm not too concerned about it.
We use
Here's the result with
And here's the result with
EDIT: I added parallel test and the results indeed confirms the behavior you mention:
And the results with
Versus
|
No description provided.