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

Function resultRecursive

expr/project_test.go:159–169  ·  view source on GitHub ↗
(params ...any)

Source from the content-addressed store, hash-verified

157}
158
159func resultRecursive(params ...any) *ResultTypeExpr {
160 rt := resultType(params...)
161 recAtt := &NamedAttributeExpr{Name: "rec", Attribute: &AttributeExpr{Type: rt, Description: "desc rec"}}
162 obj := AsObject(rt)
163 *obj = append(*obj, recAtt)
164 for _, v := range rt.Views {
165 vObj := v.Type.(*Object)
166 *vObj = append(*vObj, recAtt)
167 }
168 return rt
169}

Callers 1

project_test.goFile · 0.85

Calls 2

resultTypeFunction · 0.85
AsObjectFunction · 0.85

Tested by

no test coverage detected