GoTypeNameWithDefaults returns the Go type name of the given attribute type. The result of this function differs from GoTypeName when the attribute type is an object (note: not a user type) and the name is thus an inline struct definition. In this case accounting for default values may cause child a
(att *expr.AttributeExpr)
| 285 | // definition. In this case accounting for default values may cause child |
| 286 | // attributes to use non-pointer fields. |
| 287 | func (s *NameScope) GoTypeNameWithDefaults(att *expr.AttributeExpr) string { |
| 288 | if _, ok := att.Type.(*expr.Object); ok { |
| 289 | return s.GoTypeDef(att, false, true) |
| 290 | } |
| 291 | return s.GoTypeName(att) |
| 292 | } |
| 293 | |
| 294 | // GoFullTypeName returns the Go type name of the given data type qualified with |
| 295 | // the given package name if applicable and if not the empty string. |
no test coverage detected