MCPcopy Create free account
hub / github.com/cloudfoundry/cli / randomElement

Function randomElement

util/randomword/generator.go:223–228  ·  view source on GitHub ↗
(r *rand.Rand, fullList string)

Source from the content-addressed store, hash-verified

221}
222
223func randomElement(r *rand.Rand, fullList string) string {
224 wordList := strings.Split(fullList, "\n")
225 randomWordIndex := r.Int() % len(wordList)
226
227 return wordList[randomWordIndex]
228}

Callers 2

RandomAdjectiveMethod · 0.85
RandomNounMethod · 0.85

Calls 1

IntMethod · 0.65

Tested by

no test coverage detected