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

Function tobj

http/codegen/openapi/v3/types_test.go:49–58  ·  view source on GitHub ↗
(attrs ...any)

Source from the content-addressed store, hash-verified

47)
48
49func tobj(attrs ...any) typ {
50 res := typ{Type: "object"}
51 if len(attrs) == 0 {
52 res.SkipProps = true
53 }
54 for i := 0; i < len(attrs); i += 2 {
55 res.Props = append(res.Props, attr{Name: attrs[i].(string), Val: attrs[i+1].(typ)})
56 }
57 return res
58}
59
60func tmap() typ {
61 return typ{Type: "object", Props: []attr{{Name: "map", Val: typ{Type: "object"}}}}

Callers 2

TestBuildBodyTypesFunction · 0.85
TestBuildOperationFunction · 0.85

Calls

no outgoing calls

Tested by

no test coverage detected