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

能不能将生成代码的功能拆分成一个工具,独立使用 #17

Open
mei-rune opened this issue Jan 22, 2024 · 2 comments
Open

Comments

@mei-rune
Copy link

mei-rune commented Jan 22, 2024

我有一个类似的功能, 直接用 golang 定义接口然后生成代码
https://github.com/mei-rune/gogen/blob/master/intro.md

但是我不喜欢它, 当初也想过用 protoc 生成, 但因为已有功能的原因没有用 protoc , 现在发现了这个,请问能不能将 代码生成拆分出来, 成为一个独立的工具。
这样子,我们可以在原来的框架下无痛引入这个工具来提高效率。

@zhufuyi
Copy link
Owner

zhufuyi commented Jan 26, 2024

sponge是根据自有的模板布局来生成代码的,所以才能做到高度自动化和避免编写重复代码,是无法兼容你们自有的框架下的代码布局的,没有计划把生成代码功能独立出来。

@mei-rune
Copy link
Author

也并非不能做到,像 github.com/twitchtv/twirp 就做了, 当然它做的不好。

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