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

Method ViewHasAttribute

expr/result_type.go:168–174  ·  view source on GitHub ↗

ViewHasAttribute returns true if the result type view has the given attribute.

(view, attr string)

Source from the content-addressed store, hash-verified

166// ViewHasAttribute returns true if the result type view has the given
167// attribute.
168func (rt *ResultTypeExpr) ViewHasAttribute(view, attr string) bool {
169 v := rt.View(view)
170 if v == nil {
171 return false
172 }
173 return v.Find(attr) != nil
174}
175
176// Finalize builds the default view if not explicitly defined and finalizes
177// the underlying UserTypeExpr.

Callers 1

ValidateMethod · 0.80

Calls 2

ViewMethod · 0.95
FindMethod · 0.80

Tested by

no test coverage detected