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

Function objRecursive

codegen/service/convert_test.go:234–250  ·  view source on GitHub ↗
()

Source from the content-addressed store, hash-verified

232}
233
234func objRecursive() *expr.UserTypeExpr {
235 res := &expr.UserTypeExpr{
236 AttributeExpr: &expr.AttributeExpr{
237 Type: &expr.Object{
238 {Name: "Foo", Attribute: &expr.AttributeExpr{Type: expr.String}},
239 {Name: "Bar", Attribute: &expr.AttributeExpr{Type: expr.Int}},
240 },
241 },
242 TypeName: "objRecursiveT",
243 }
244 obj := res.Type.(*expr.Object)
245 *obj = append(*obj, &expr.NamedAttributeExpr{
246 Name: "Rec",
247 Attribute: &expr.AttributeExpr{Type: res}})
248
249 return res
250}
251
252type objT struct {
253 Foo string

Callers 1

TestCompatibleFunction · 0.85

Calls

no outgoing calls

Tested by

no test coverage detected