Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

反馈一下 #12

Open
kotlin2018 opened this issue Mar 15, 2021 · 2 comments
Open

反馈一下 #12

kotlin2018 opened this issue Mar 15, 2021 · 2 comments

Comments

@kotlin2018
Copy link

No.1: 生成的 entity/db_entity.go 中,默认导入了

"github.com/go-sql-driver/mysql"
"time" 而实际上,entity/db_entity.go 是不需要这些包的。

No.2: 生成的CURD代码中缺少依赖,缺少 entity包,缺少 config包,而实际 import 中并没有导入 entity包,config包。

No.3: 实际删除 assets包,并不影响整个项目生成目标代码,不知是什么原因,这里能详细介绍一下么。

No.4: logic.go 文件中 CreateCURD() 方法内部的方法调用顺序有点问题,所有才出现了 No.2 中的请况。

No.5: 有些方法的的执行好像重复初始化了常量,变量哦。我在看源码的过程中有这种体会。不知事实是不是这样。

No.6: 整体思路很棒,很巧妙的避免了使用反射。可扩展性强,能很方便的将其嵌入到其他组件中。

No.7: bindata.go,logic.go 中这两个文件,您能抽空在你的公众号,或者博客中介绍一下么?

@kotlin2018
Copy link
Author

有些问题我自己解决了,目前只有两个问题解决不了。
No.1: 生成的 init.go 中的 dbConfig 无法自定义,建议新增一个6命令,用来配置 dbConfig。

No.2: 生成的CURD代码中,import 中没有自动导入entity包,需要自己手动加载。

@yezihack
Copy link
Owner

谢谢您的建议,我准备开发下一版本。你提到的问题我尽量解决掉。

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants