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

Method HaveSeen

expr/random.go:88–96  ·  view source on GitHub ↗

HaveSeen stores the seen value in the randomizer, for reuse later

(typeID string, val *any)

Source from the content-addressed store, hash-verified

86
87// HaveSeen stores the seen value in the randomizer, for reuse later
88func (r *ExampleGenerator) HaveSeen(typeID string, val *any) {
89 r.mu.Lock()
90 defer r.mu.Unlock()
91 if r.seen == nil {
92 r.seen = make(map[string]*any)
93 }
94
95 r.seen[typeID] = val
96}
97
98// NewFakerRandomizer creates a randomizer that uses the faker library to
99// generate fake but reasonable values.

Callers 1

recExampleMethod · 0.80

Calls

no outgoing calls

Tested by

no test coverage detected