primitiveAliasGoType resolves the native Go type for a primitive alias branch. It uses expr.IsPrimitive to enforce the type contract and then unwraps aliases.
(dt expr.DataType)
| 1230 | // primitiveAliasGoType resolves the native Go type for a primitive alias branch. |
| 1231 | // It uses expr.IsPrimitive to enforce the type contract and then unwraps aliases. |
| 1232 | func primitiveAliasGoType(dt expr.DataType) (string, bool) { |
| 1233 | if !expr.IsPrimitive(dt) { |
| 1234 | return "", false |
| 1235 | } |
| 1236 | for { |
| 1237 | ut, ok := dt.(expr.UserType) |
| 1238 | if !ok { |
| 1239 | return codegen.GoNativeTypeName(dt), true |
| 1240 | } |
| 1241 | dt = ut.Attribute().Type |
| 1242 | } |
| 1243 | } |
| 1244 | |
| 1245 | // buildErrorInitData creates the data needed to generate code around endpoint error return values. |
| 1246 | func buildErrorInitData(er *expr.ErrorExpr, scope *codegen.NameScope) *ErrorInitData { |
no test coverage detected