mirror of
https://github.com/tiger1103/gfast.git
synced 2026-09-21 18:20:47 +00:00
代码生成自动注册模块路由,插件模块代码生成支持
This commit is contained in:
@@ -730,7 +730,7 @@ func (s *toolsGenTable) genModuleRouter(curDir, moduleName, packageName string)
|
||||
routerFilePath = strings.Join([]string{curDir, "/plugins/router/", gstr.CaseSnake(moduleName), ".go"}, "")
|
||||
}
|
||||
code := fmt.Sprintf(`package router%simport _ "%s/router"`, "\n", packageName)
|
||||
s.createFile(routerFilePath, code, false)
|
||||
err = s.createFile(routerFilePath, code, false)
|
||||
}
|
||||
return
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user