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

Function projectedTypeContext

codegen/service/service_data.go:1015–1017  ·  view source on GitHub ↗

projectedTypeContext returns a contextual attribute for a projected type. Projected types are Go types that uses pointers for all attributes (even the required ones).

(pkg string, ptr bool, scope *codegen.NameScope)

Source from the content-addressed store, hash-verified

1013// Projected types are Go types that uses pointers for all attributes (even the
1014// required ones).
1015func projectedTypeContext(pkg string, ptr bool, scope *codegen.NameScope) *codegen.AttributeContext {
1016 return codegen.NewAttributeContext(ptr, false, true, pkg, scope)
1017}
1018
1019// collectTypes recurses through the attribute to gather all user types and
1020// records them in userTypes.

Callers 3

buildTypeInitsFunction · 0.85
buildProjectionsFunction · 0.85
buildValidationsFunction · 0.85

Calls 1

NewAttributeContextFunction · 0.92

Tested by

no test coverage detected