Use crypto/rand.Read instead of deprecated math/rand.Read.

Signed-off-by: James Blair <mail@jamesblair.net>
This commit is contained in:
James Blair 2023-08-19 22:17:45 +12:00
parent 4154f9c642
commit ca13fd8a2d
No known key found for this signature in database

View File

@ -1,8 +1,8 @@
package bbolt
import (
"crypto/rand"
"fmt"
"math/rand"
"os"
"path/filepath"
"testing"
@ -46,7 +46,10 @@ func createAndPutKeys(t *testing.T) {
}
var key [16]byte
rand.Read(key[:])
_, rerr := rand.Read(key[:])
if rerr != nil {
return rerr
}
if err := nodes.Put(key[:], nil); err != nil {
return err
}