v2.10: Use Go 1.21 in nightlies, update rand usage (#4490)

- Use Go 1.21 in nightlies
- Both rand.Seed and rand.Read are both deprecated, remove its use to
fix staticcheck errors

```go
server/client.go:95:2: SA1019: 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. (staticcheck)

server/jetstream_test.go:20399:2: 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)
```
This commit is contained in:
Neil
2023-09-06 10:22:25 +01:00
committed by GitHub
11 changed files with 13 additions and 19 deletions

2
go.mod
View File

@@ -1,6 +1,6 @@
module github.com/nats-io/nats-server/v2
go 1.19
go 1.20
require (
github.com/klauspost/compress v1.16.7