Commit a45442b 1 parent 38b6caf commit a45442b Copy full SHA for a45442b
File tree 2 files changed +7
-1
lines changed
2 files changed +7
-1
lines changed Original file line number Diff line number Diff line change @@ -248,7 +248,7 @@ func getUserDefinedType(column metadata.Column) string {
248
248
switch column .DataType .Kind {
249
249
case metadata .EnumType :
250
250
return utils .ToGoIdentifier (column .DataType .Name )
251
- case metadata .UserDefinedType , metadata . ArrayType :
251
+ case metadata .UserDefinedType :
252
252
return "string"
253
253
}
254
254
@@ -258,6 +258,11 @@ func getUserDefinedType(column metadata.Column) string {
258
258
func getGoType (column metadata.Column ) interface {} {
259
259
defaultGoType := toGoType (column )
260
260
261
+ if column .DataType .Kind == metadata .ArrayType {
262
+ sliceType := reflect .SliceOf (reflect .TypeOf (defaultGoType ))
263
+ return reflect .Zero (sliceType ).Interface ()
264
+ }
265
+
261
266
if column .IsNullable {
262
267
return reflect .New (reflect .TypeOf (defaultGoType )).Interface ()
263
268
}
Original file line number Diff line number Diff line change
1
+ package out
You can’t perform that action at this time.
0 commit comments