Code
Hub
Workspaces
Connect
Indexed graphs
Engine
MCP
copy
hub
/
github.com/brianvoe/gofakeit
/ IntN
Method
IntN
number.go:144–144 ·
view source on GitHub ↗
IntN will generate a random int value between 0 and n
(n int)
Source
from the content-addressed store, hash-verified
142
143
// IntN will generate a random int value between 0 and n
144
func
(f *Faker) IntN(n int) int {
return
intNFunc(f, n) }
145
146
func
intNFunc(f *Faker, n int) int {
147
if
n <= 0 {
Callers
15
getRandValue
Function · 0.80
replaceWithNumbers
Function · 0.80
randLetter
Function · 0.80
randHexLetter
Function · 0.80
randDigit
Function · 0.80
randIntRange
Function · 0.80
ipv4Address
Function · 0.80
ipv6Address
Function · 0.80
macAddress
Function · 0.80
currency
Function · 0.80
shuffleInts
Function · 0.80
randomInt
Function · 0.80
Calls
1
intNFunc
Function · 0.85
Tested by
5
TestLookupChecking
Function · 0.64
TestLookupCalls
Function · 0.64
TestExternalCustomType
Function · 0.64
TestGetAllRequests
Function · 0.64
TestPostAllRequests
Function · 0.64