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

feat(config): index4/6允许使用列表提供多个规则 #188

Merged
merged 3 commits into from
Jul 22, 2020
Merged

feat(config): index4/6允许使用列表提供多个规则 #188

merged 3 commits into from
Jul 22, 2020

Conversation

tongyifan
Copy link
Contributor

No description provided.

run.py Outdated
"""
get IP address
"""
index = get_config('index' + ip_type, "default")
if not index:
Copy link
Owner

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

这个地方有BUG,
如果列表里有0的话会进入死循环

Copy link
Owner

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

另外如果递归的话,这个get_config 放在函数调用的位置更合适点

@@ -110,7 +111,8 @@
"type": [
"string",
"integer",
"boolean"
"boolean",
"array"
Copy link
Owner

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

array的话限制一下item的类型 string/integer

{
"items": {
    "type": ["string","integer"],
    "minimum": 0
  },
  "uniqueItems": true,
  "minItems": 1,
  "minimum": 0
}

@tongyifan tongyifan requested a review from NewFuture July 21, 2020 06:29
@NewFuture NewFuture merged commit e424df3 into NewFuture:master Jul 22, 2020
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

Successfully merging this pull request may close these issues.

2 participants