ViewHasAttribute returns true if the result type view has the given attribute.
(view, attr string)
| 166 | // ViewHasAttribute returns true if the result type view has the given |
| 167 | // attribute. |
| 168 | func (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. |