MCPcopy Create free account
hub / github.com/goadesign/goa / NewRandom

Function NewRandom

expr/random.go:64–68  ·  view source on GitHub ↗

NewRandom returns a random value generator seeded from the given string value, using the faker library to generate random but realistic values.

(seed string)

Source from the content-addressed store, hash-verified

62// NewRandom returns a random value generator seeded from the given string
63// value, using the faker library to generate random but realistic values.
64func NewRandom(seed string) *ExampleGenerator {
65 return &ExampleGenerator{
66 Randomizer: NewFakerRandomizer(seed),
67 }
68}
69
70type ExampleGenerator struct {
71 Randomizer

Callers 12

TestByPatternFunction · 0.92
TestByFormatUUIDFunction · 0.92
TestExampleFunction · 0.92
TestHashAttributeFunction · 0.92
TestBuildOperationFunction · 0.92
TestBuildOperationIDFunction · 0.92
NewAPIExprFunction · 0.85
project_test.goFile · 0.85

Calls 1

NewFakerRandomizerFunction · 0.85

Tested by 10

TestByPatternFunction · 0.74
TestByFormatUUIDFunction · 0.74
TestExampleFunction · 0.74
TestHashAttributeFunction · 0.74
TestBuildOperationFunction · 0.74
TestBuildOperationIDFunction · 0.74