Source File
rand.go
Belonging Package
github.com/aws/aws-sdk-go-v2/internal/rand
package rand
import (
)
func () {
Reader = rand.Reader
}
// Reader provides a random reader that can reset during testing.
var Reader io.Reader
var floatMaxBigInt = big.NewInt(1 << 53)
// Float64 returns a float64 read from an io.Reader source. The returned float will be between [0.0, 1.0).
func ( io.Reader) (float64, error) {
, := rand.Int(, floatMaxBigInt)
if != nil {
return 0, fmt.Errorf("failed to read random value, %v", )
}
return float64(.Int64()) / (1 << 53), nil
}
// CryptoRandFloat64 returns a random float64 obtained from the crypto rand
// source.
func () (float64, error) {
return Float64(Reader)
}
The pages are generated with Golds v0.4.9. (GOOS=linux GOARCH=amd64)