Skip to content

Commit

Permalink
tests: stop using deprecated math/rand.Read
Browse files Browse the repository at this point in the history
  • Loading branch information
marten-seemann committed Apr 17, 2023
1 parent d259f1d commit aff6ab5
Showing 1 changed file with 3 additions and 1 deletion.
4 changes: 3 additions & 1 deletion webtransport_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -138,9 +138,11 @@ func newEchoHandler(t *testing.T) func(*webtransport.Session) {
}
}

var random = rand.New(rand.NewSource(time.Now().UnixNano()))

func getRandomData(l int) []byte {
data := make([]byte, l)
rand.Read(data)
random.Read(data)
return data
}

Expand Down

0 comments on commit aff6ab5

Please sign in to comment.