MCPcopy Index your code
hub / github.com/riverqueue/river / IntBetween

Function IntBetween

rivershared/util/randutil/rand_util.go:24–26  ·  view source on GitHub ↗

IntBetween generates a random number in the range of [lowerLimit, upperLimit).

(lowerLimit, upperLimit int)

Source from the content-addressed store, hash-verified

22
23// IntBetween generates a random number in the range of [lowerLimit, upperLimit).
24func IntBetween(lowerLimit, upperLimit int) int {
25 return rand.IntN(upperLimit-lowerLimit) + lowerLimit
26}

Callers 5

TestProducer_PollOnlyFunction · 0.92
TestPeriodicJobEnqueuerFunction · 0.92
TestIntBetweenFunction · 0.85
DurationBetweenFunction · 0.85

Calls

no outgoing calls

Tested by 4

TestProducer_PollOnlyFunction · 0.74
TestPeriodicJobEnqueuerFunction · 0.74
TestIntBetweenFunction · 0.68

Used in the wild real call sites across dependent graphs

searching dependent graphs…