mirror of
https://github.com/zeromicro/go-zero.git
synced 2026-05-09 16:10:00 +08:00
fix(goctl): multi imports the api cause redeclared error in types.go (#3988)
Co-authored-by: Kevin Wan <wanjunfeng@gmail.com>
This commit is contained in:
@@ -32,11 +32,8 @@ type API struct {
|
||||
func convert2API(a *ast.AST, importSet map[string]lang.PlaceholderType, is *importstack.ImportStack) (*API, error) {
|
||||
var api = new(API)
|
||||
api.importManager = is
|
||||
api.importSet = make(map[string]lang.PlaceholderType)
|
||||
api.importSet = importSet
|
||||
api.Filename = a.Filename
|
||||
for k, v := range importSet {
|
||||
api.importSet[k] = v
|
||||
}
|
||||
one := a.Stmts[0]
|
||||
syntax, ok := one.(*ast.SyntaxStmt)
|
||||
if !ok {
|
||||
|
||||
Reference in New Issue
Block a user