IsPrimitivePointer returns true if the attribute with the given name is a primitive pointer in the given parent attribute.
(name string, att *expr.AttributeExpr)
| 215 | // IsPrimitivePointer returns true if the attribute with the given name is a |
| 216 | // primitive pointer in the given parent attribute. |
| 217 | func (a *AttributeContext) IsPrimitivePointer(name string, att *expr.AttributeExpr) bool { |
| 218 | if at := att.Find(name); at != nil && (at.Type == expr.Any || at.Type == expr.Bytes) { |
| 219 | return false |
| 220 | } |
| 221 | if a.Pointer { |
| 222 | return true |
| 223 | } |
| 224 | return att.IsPrimitivePointer(name, a.UseDefault) |
| 225 | } |
| 226 | |
| 227 | // Pkg returns the package name of the given type. |
| 228 | func (a *AttributeContext) Pkg(att *expr.AttributeExpr) string { |