-
-
Notifications
You must be signed in to change notification settings - Fork 6.4k
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
不一定要合并 简单的实现了一个测试版本的服用已经删除自动化生成的文件保留自己写的代码部分 gvakeepcode的示例 #1722
Closed
Conversation
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
抛砖引玉的随便写的(很多bug和情况没考虑 将就能用下) // @gvastartkeep //@gvaendkeep 之间的代码(自写代码)会被保留到新的自动生成的代码中去(当然可以自己去re正则里更改) 注意只是简单的用re正则实现了一个非常非常基础的东西 谨慎用!!!!!(本身就是自用的) 前端复用代码的时候 勾选保留代码(测试 即可 注意实现方式很屎山 创建了一个sqlite在rm_file文件夹里 用来记录删除的文件路径等 以及一些初始化都在main里 没太多时间懒得看) 临时自用着分享一下而已
# Conflicts: # server/model/system/sys_auto_code.go
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
比之前的 合并在了同一个数据库records(记录了删除文件和新增文件的地址)
实现 用re正则去匹配 @gvastartkeep @gvaendkeep (放在注释里例如 //@gvastartkeep) 保留这个和之间的代码,在下次生成文件的时候自动添加到文件末尾. 有局限性 不过能减轻一定的工作量