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

Method Example

expr/user_type.go:85–90  ·  view source on GitHub ↗

Example produces an example for the user type which is JSON serialization compatible.

(r *ExampleGenerator)

Source from the content-addressed store, hash-verified

83// Example produces an example for the user type which is JSON serialization
84// compatible.
85func (u *UserTypeExpr) Example(r *ExampleGenerator) any {
86 if ex := u.recExample(r); ex != nil {
87 return *ex
88 }
89 return nil
90}
91
92func (u *UserTypeExpr) recExample(r *ExampleGenerator) *any {
93 if ex, ok := r.PreviouslySeen(u.ID()); ok {

Callers 1

Calls 1

recExampleMethod · 0.95

Tested by 1