diff --git a/internal/strategies/helpers.go b/internal/strategies/helpers.go index cd541e8..14816f8 100644 --- a/internal/strategies/helpers.go +++ b/internal/strategies/helpers.go @@ -78,13 +78,6 @@ type rng struct { random *rand.Rand } -func (r *rng) int() int { - r.Lock() - n := r.random.Intn(100) + 1 - r.Unlock() - return n -} - func (r *rng) float() float64 { return float64(r.int()) } @@ -96,8 +89,8 @@ func (r *rng) string() string { return strconv.Itoa(n) } -// newRng creates a new random number generator for numbers between 1-100 -// and uses a mutex internally to ensure safe concurrent reads. +// newRng creates a new random number generator and uses a mutex +// internally to ensure safe concurrent reads. func newRng() *rng { seed := time.Now().UnixNano() + int64(os.Getpid()) return &rng{random: rand.New(rand.NewSource(seed))}