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

Method Prepare

expr/http_response.go:123–130  ·  view source on GitHub ↗

Prepare makes sure the response is initialized even if not done explicitly by

()

Source from the content-addressed store, hash-verified

121// Prepare makes sure the response is initialized even if not done explicitly
122// by
123func (r *HTTPResponseExpr) Prepare() {
124 if r.Headers == nil {
125 r.Headers = NewEmptyMappedAttributeExpr()
126 }
127 if r.Cookies == nil {
128 r.Cookies = NewEmptyMappedAttributeExpr()
129 }
130}
131
132// Validate checks that the response definition is consistent: its status is set
133// and the result type definition if any is valid.

Callers

nothing calls this directly

Calls 1

Tested by

no test coverage detected