Skip to content
New issue

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

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

Already on GitHub? # to your account

Refactoring, using structure, passing pointer objects, optimizing jud… #37

Open
wants to merge 3 commits into
base: main
Choose a base branch
from

Conversation

sockx
Copy link
Contributor

@sockx sockx commented May 29, 2023

Refactoring, using structure, passing pointer objects, optimizing judgment logic, adding rule checking function

进行了重构,主要有以下几点

  • 使用了cobra处理flag
  • args绑定flag直接调用
  • 修改传递map为传递结构体指针
  • 添加检查规则的命令
  • 优化规则匹配方式(去除了提取Mode的正则,精简了判断逻辑,对规则写法要求更严谨,所以引入了规则检测)

sockx added 2 commits May 29, 2023 10:30
…gment logic, adding rule checking function

english

fix check rules
@zhzyker
Copy link
Owner

zhzyker commented May 29, 2023

我还寻思一直想大改一下代码呢,好多都是刚会点Golang时候写的屎山,还一直没顾得上弄

@FloyzenCode
Copy link

good job

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

Successfully merging this pull request may close these issues.

3 participants