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

Method View

expr/result_type.go:152–159  ·  view source on GitHub ↗

View returns the view with the given name.

(name string)

Source from the content-addressed store, hash-verified

150
151// View returns the view with the given name.
152func (rt *ResultTypeExpr) View(name string) *ViewExpr {
153 for _, v := range rt.Views {
154 if v.Name == name {
155 return v
156 }
157 }
158 return nil
159}
160
161// HasMultipleViews returns true if the result type has more than one view.
162func (rt *ResultTypeExpr) HasMultipleViews() bool {

Callers 7

ViewHasAttributeMethod · 0.95
ensureDefaultViewMethod · 0.95
ValidateMethod · 0.80
projectSingleFunction · 0.80
projectCollectionFunction · 0.80
ViewFunction · 0.80
buildConstructorCodeFunction · 0.80

Calls

no outgoing calls

Tested by

no test coverage detected