prysm-pulse/tools/analyzers/cryptorand/testdata/rand_new.go
Ivan Martinez c69b3f568e
Move hard-coded constants to global consts (#6467)
* Move hard-coded constants to global consts
* Fixes
* Merge branch 'master' into remove-hard-constants
* Merge refs/heads/master into remove-hard-constants
* Merge refs/heads/master into remove-hard-constants
* Merge refs/heads/master into remove-hard-constants
* Merge refs/heads/master into remove-hard-constants
* Comments
* Merge refs/heads/master into remove-hard-constants
* Merge refs/heads/master into remove-hard-constants
* Merge refs/heads/master into remove-hard-constants
* Merge refs/heads/master into remove-hard-constants
* Merge refs/heads/master into remove-hard-constants
* Merge branch 'master' of github.com:prysmaticlabs/prysm into remove-hard-constants
2020-07-03 15:25:32 +00:00

21 lines
362 B
Go

package testdata
import (
"math/rand"
mathRand "math/rand"
"time"
)
func UseRandNew() {
randGenerator := mathRand.New(rand.NewSource(time.Now().UnixNano()))
start := uint64(randGenerator.Intn(32))
_ = start
randGenerator = rand.New(rand.NewSource(time.Now().UnixNano()))
}
func UseWithoutSeed() {
assignedIndex := rand.Intn(128)
_ = assignedIndex
}