Rename changes the type name to the given value.
(n string)
| 41 | |
| 42 | // Rename changes the type name to the given value. |
| 43 | func (u *UserTypeExpr) Rename(n string) { |
| 44 | // Remember original name for example to generate friendly docs. |
| 45 | u.AddMeta("name:original", u.TypeName) |
| 46 | delete(u.Meta, "struct:type:name") |
| 47 | u.TypeName = n |
| 48 | } |
| 49 | |
| 50 | // IsCompatible returns true if u describes the (Go) type of val. |
| 51 | func (u *UserTypeExpr) IsCompatible(val any) bool { |