...

Source file src/github.com/hashicorp/golang-lru/testing.go

Documentation: github.com/hashicorp/golang-lru

     1  package lru
     2  
     3  import (
     4  	"crypto/rand"
     5  	"math"
     6  	"math/big"
     7  	"testing"
     8  )
     9  
    10  func getRand(tb testing.TB) int64 {
    11  	out, err := rand.Int(rand.Reader, big.NewInt(math.MaxInt64))
    12  	if err != nil {
    13  		tb.Fatal(err)
    14  	}
    15  	return out.Int64()
    16  }
    17  

View as plain text