fix(goctl): dart gen user defined struct array (#1620)

This commit is contained in:
Fyn
2022-03-07 14:11:47 +08:00
committed by GitHub
parent 68a81fea8a
commit 365c569d7c
3 changed files with 38 additions and 5 deletions

View File

@@ -128,11 +128,10 @@ func specTypeToDart(tp spec.Type) (string, error) {
}
s := getBaseType(valueType)
if len(s) == 0 {
return s, errors.New("unsupported primitive type " + tp.Name())
if len(s) != 0 {
return s, nil
}
return s, nil
return fmt.Sprintf("List<%s>", valueType), nil
case spec.InterfaceType:
return "Object", nil
case spec.PointerType: