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

Method projectIdentifier

expr/result_type.go:434–444  ·  view source on GitHub ↗

projectIdentifier computes the projected result type identifier by adding the "view" param. We need the projected result type identifier to be different so that looking up projected result types from ProjectedResultTypes works correctly. It's also good for clients.

(view string)

Source from the content-addressed store, hash-verified

432// that looking up projected result types from ProjectedResultTypes works
433// correctly. It's also good for clients.
434func (rt *ResultTypeExpr) projectIdentifier(view string) string {
435 base, params, err := mime.ParseMediaType(rt.Identifier)
436 if err != nil {
437 base = rt.Identifier
438 }
439 if params == nil {
440 params = make(map[string]string)
441 }
442 params["view"] = view
443 return mime.FormatMediaType(base, params)
444}
445
446// EvalName returns the generic definition name used in error messages.
447func (v *ViewExpr) EvalName() string {

Callers 2

projectSingleFunction · 0.80
projectCollectionFunction · 0.80

Calls

no outgoing calls

Tested by

no test coverage detected