mirror of
https://github.com/zeromicro/go-zero.git
synced 2026-05-07 15:10:01 +08:00
fix array type generation error (#5142)
This commit is contained in:
@@ -425,9 +425,12 @@ func (a *Analyzer) getType(expr *ast.BodyStmt, req bool) (spec.Type, error) {
|
||||
}
|
||||
if body.LBrack != nil {
|
||||
if body.Star != nil {
|
||||
return spec.PointerType{
|
||||
return spec.ArrayType{
|
||||
RawName: rawText,
|
||||
Type: tp,
|
||||
Value: spec.PointerType{
|
||||
RawName: rawText,
|
||||
Type: tp,
|
||||
},
|
||||
}, nil
|
||||
}
|
||||
return spec.ArrayType{
|
||||
|
||||
Reference in New Issue
Block a user