mirror of
https://github.com/etcd-io/bbolt.git
synced 2025-05-31 11:42:30 +00:00
Use crypto/rand.Read instead of deprecated math/rand.Read.
Signed-off-by: James Blair <mail@jamesblair.net>
This commit is contained in:
parent
4154f9c642
commit
ca13fd8a2d
@ -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
|
||||
}
|
||||
|
Loading…
x
Reference in New Issue
Block a user