MCPcopy Create free account
hub / github.com/Pallinder/go-randomdata / randomFrom

Function randomFrom

random_data.go:107–109  ·  view source on GitHub ↗

Returns a random part of a slice

(source []string)

Source from the content-addressed store, hash-verified

105
106// Returns a random part of a slice
107func randomFrom(source []string) string {
108 return source[privateRand.Intn(len(source))]
109}
110
111// Title returns a random title, gender decides the gender of the name
112func Title(gender int) string {

Callers 15

TitleFunction · 0.85
FirstNameFunction · 0.85
LastNameFunction · 0.85
EmailFunction · 0.85
CountryFunction · 0.85
CurrencyFunction · 0.85
CityFunction · 0.85
ProvinceForCountryFunction · 0.85
StateFunction · 0.85
StreetFunction · 0.85
StreetForCountryFunction · 0.85
ParagraphFunction · 0.85

Calls 1

IntnMethod · 0.80

Tested by

no test coverage detected

Used in the wild real call sites across dependent graphs

searching dependent graphs…