mirror of
https://github.com/42wim/matterbridge.git
synced 2024-11-27 05:02:02 -08:00
17 lines
227 B
Go
17 lines
227 B
Go
package lru
|
|
|
|
import (
|
|
"crypto/rand"
|
|
"math"
|
|
"math/big"
|
|
"testing"
|
|
)
|
|
|
|
func getRand(tb testing.TB) int64 {
|
|
out, err := rand.Int(rand.Reader, big.NewInt(math.MaxInt64))
|
|
if err != nil {
|
|
tb.Fatal(err)
|
|
}
|
|
return out.Int64()
|
|
}
|