math/rand.Rand.Intn (method)
8 uses
math/rand (current package)
rand.go#L167: func (r *Rand) Intn(n int) int {
rand.go#L225: j := r.Intn(i + 1)
rand.go#L337: func Intn(n int) int { return globalRand.Intn(n) }
github.com/google/go-cmp/cmp
report_text.go#L18: var randBool = rand.New(rand.NewSource(time.Now().Unix())).Intn(2) == 0
github.com/google/go-cmp/cmp/internal/diff
diff.go#L122: var randInt = rand.New(rand.NewSource(time.Now().Unix())).Intn(2)
golang.org/x/crypto/ssh
tcpip.go#L77: addr.Port = 1024 + portRandomizer.Intn(60000)
golang.org/x/pkgsite/internal/config
config.go#L561: return fields[rng.Intn(len(fields))]
google.golang.org/grpc/internal/grpcrand
grpcrand.go#L45: res := r.Intn(n)
![]() |
The pages are generated with Golds v0.3.2-preview. (GOOS=darwin GOARCH=amd64) Golds is a Go 101 project developed by Tapir Liu. PR and bug reports are welcome and can be submitted to the issue list. Please follow @Go100and1 (reachable from the left QR code) to get the latest news of Golds. |