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)
| 432 | // that looking up projected result types from ProjectedResultTypes works |
| 433 | // correctly. It's also good for clients. |
| 434 | func (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. |
| 447 | func (v *ViewExpr) EvalName() string { |
no outgoing calls
no test coverage detected