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

fix(net/ghttp):check parameter existence to determine using default or front-end value. #4182

Merged
merged 7 commits into from
Mar 8, 2025

Conversation

river291
Copy link
Contributor

@river291 river291 commented Mar 4, 2025

For non-existent keys, there are two scenarios:

  1. The value might inherently not exist for that key.
  2. A default value (e.g., from the default/d tag) is provided.

Implementation logic:

  • If the key does NOT exist: Use the default value.
  • If the key EXISTS:
  1. Value is absent: Fall back to the default value.
  2. Value is present: Directly use the frontend-provided value without additional checks (e.g., no IsEmpty() validation as in previous versions).

@hailaz hailaz requested review from gqcn and wln32 March 5, 2025 08:37
@hailaz hailaz requested a review from gqcn March 7, 2025 08:42
@gqcn gqcn merged commit bcda48b into gogf:master Mar 8, 2025
9 checks passed
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.

请求参数如果是bool型,false会被解析为true,只有0才会解析为false
4 participants