Skip to content

Commit 668e29a

Browse files
committed
Added quick & dirty fix for #229
Fixes #229
1 parent 7c5548c commit 668e29a

File tree

1 file changed

+4
-0
lines changed

1 file changed

+4
-0
lines changed

generator/types.go

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -376,7 +376,11 @@ func (m *Model) CtorArgs() string {
376376

377377
if paramsLen == i+1 && sig.Variadic() {
378378
typeName = "..." + typeName
379+
} else // TODO: Dirty fix for #229, address properly inside findableTypeName or typeString
380+
if collectionElemType(param.Type()) != nil && !strings.HasPrefix(typeName, "[]") {
381+
typeName = "[]" + typeName
379382
}
383+
380384
paramName := param.Name()
381385
if paramName == "s" {
382386
paramName = fmt.Sprintf("arg%v", i)

0 commit comments

Comments
 (0)