Name returns the type name.
()
| 30 | |
| 31 | // Name returns the type name. |
| 32 | func (u *UserTypeExpr) Name() string { |
| 33 | if u.AttributeExpr == nil { |
| 34 | return u.TypeName |
| 35 | } |
| 36 | if n, ok := u.Meta["struct:type:name"]; ok { |
| 37 | return n[0] |
| 38 | } |
| 39 | return u.TypeName |
| 40 | } |
| 41 | |
| 42 | // Rename changes the type name to the given value. |
| 43 | func (u *UserTypeExpr) Rename(n string) { |