Pallinder/go-randomdata

Feature Request: Random string from a list

evanmcclure opened this issue · 1 comments

Hello:

Can you add a function when given a slice of strings, will return one of them at random? Suppose the new function signature looks like String(stringList ...string) string. Then, one of the strings in the given list is returned at random.

Here is an example invocation:

myString := randomdata.String("foo", "bar", "baz")

Thank you,

Evan McClure

That looks like it could be useful. Do you have a usage example and can you open a PR?